Switch the inferior too in switch_to_program_space_and_thread
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2020-01-10 Aleksandar Paunovic <aleksandar.paunovic@intel.com>
2 Pedro Alves <palves@redhat.com>
3
4 * progspace-and-thread.c (switch_to_program_space_and_thread):
5 Assert there's an inferior for PSPACE. Use
6 switch_to_inferior_no_thread to switch the inferior too.
7 * progspace.c (program_space::~program_space): Call
8 clear_symtab_users here, with SYMFILE_DEFER_BP_RESET.
9 (program_space::free_all_objfiles): Don't call clear_symtab_users
10 here.
11 * symfile.c (symbol_file_clear): Call clear_symtab_users here.
12
13 2020-01-10 Pedro Alves <palves@redhat.com>
14
15 * NEWS: Mention multi-target debugging, "info connections", and
16 "add-inferior -no-connection".
17
18 2020-01-10 Pedro Alves <palves@redhat.com>
19
20 * infrun.c: Include "target-connection.h".
21 (check_multi_target_resumption): New.
22 (proceed): Call it.
23 * target-connection.c (make_target_connection_string): Make
24 extern.
25 * target-connection.h (make_target_connection_string): Declare.
26
27 2020-01-10 Pedro Alves <palves@redhat.com>
28
29 * Makefile.in (COMMON_SFILES): Add target-connection.c.
30 * inferior.c (uiout_field_connection): New function.
31 (print_inferior): Add new "connection-id" column.
32 (add_inferior_command): Show connection number/string of added
33 inferior.
34 * process-stratum-target.h
35 (process_stratum_target::connection_string): New virtual method.
36 (process_stratum_target::connection_number): New field.
37 * remote.c (remote_target::connection_string): New override.
38 * target-connection.c: New file.
39 * target-connection.h: New file.
40 * target.c (decref_target): Remove process_stratum targets from
41 the connection list.
42 (target_stack::push): Add process_stratum targets to the
43 connection list.
44
45 2020-01-10 Pedro Alves <palves@redhat.com>
46
47 Revert:
48 2016-04-12 Pedro Alves <palves@redhat.com>
49 * serial.c (serial_open, serial_fdopen_ops, do_serial_close):
50 Remove references to name.
51 * serial.h (struct serial) <name>: Delete.
52
53 2020-01-10 Pedro Alves <palves@redhat.com>
54
55 * gdbarch-selftests.c (register_to_value_test): Remove "target
56 already pushed" check.
57
58 2020-01-10 Pedro Alves <palves@redhat.com>
59 John Baldwin <jhb@FreeBSD.org>
60
61 * aarch64-linux-nat.c
62 (aarch64_linux_nat_target::thread_architecture): Adjust.
63 * ada-tasks.c (print_ada_task_info): Adjust find_thread_ptid call.
64 (task_command_1): Likewise.
65 * aix-thread.c (sync_threadlists, aix_thread_target::resume)
66 (aix_thread_target::wait, aix_thread_target::fetch_registers)
67 (aix_thread_target::store_registers)
68 (aix_thread_target::thread_alive): Adjust.
69 * amd64-fbsd-tdep.c: Include "inferior.h".
70 (amd64fbsd_get_thread_local_address): Pass down target.
71 * amd64-linux-nat.c (ps_get_thread_area): Use ps_prochandle
72 thread's gdbarch instead of target_gdbarch.
73 * break-catch-sig.c (signal_catchpoint_print_it): Adjust call to
74 get_last_target_status.
75 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
76 * breakpoint.c (breakpoints_should_be_inserted_now): Consider all
77 inferiors.
78 (update_inserted_breakpoint_locations): Skip if inferiors with no
79 execution.
80 (update_global_location_list): When handling moribund locations,
81 find representative inferior for location's pspace, and use thread
82 count of its process_stratum target.
83 * bsd-kvm.c (bsd_kvm_target_open): Pass target down.
84 * bsd-uthread.c (bsd_uthread_target::wait): Use
85 as_process_stratum_target and adjust thread_change_ptid and
86 add_thread calls.
87 (bsd_uthread_target::update_thread_list): Use
88 as_process_stratum_target and adjust find_thread_ptid,
89 thread_change_ptid and add_thread calls.
90 * btrace.c (maint_btrace_packet_history_cmd): Adjust
91 find_thread_ptid call.
92 * corelow.c (add_to_thread_list): Adjust add_thread call.
93 (core_target_open): Adjust add_thread_silent and thread_count
94 calls.
95 (core_target::pid_to_str): Adjust find_inferior_ptid call.
96 * ctf.c (ctf_target_open): Adjust add_thread_silent call.
97 * event-top.c (async_disconnect): Pop targets from all inferiors.
98 * exec.c (add_target_sections): Push exec target on all inferiors
99 sharing the program space.
100 (remove_target_sections): Remove the exec target from all
101 inferiors sharing the program space.
102 (exec_on_vfork): New.
103 * exec.h (exec_on_vfork): Declare.
104 * fbsd-nat.c (fbsd_add_threads): Add fbsd_nat_target parameter.
105 Pass it down.
106 (fbsd_nat_target::update_thread_list): Adjust.
107 (fbsd_nat_target::resume): Adjust.
108 (fbsd_handle_debug_trap): Add fbsd_nat_target parameter. Pass it
109 down.
110 (fbsd_nat_target::wait, fbsd_nat_target::post_attach): Adjust.
111 * fbsd-tdep.c (fbsd_corefile_thread): Adjust
112 get_thread_arch_regcache call.
113 * fork-child.c (gdb_startup_inferior): Pass target down to
114 startup_inferior and set_executing.
115 * gdbthread.h (struct process_stratum_target): Forward declare.
116 (add_thread, add_thread_silent, add_thread_with_info)
117 (in_thread_list): Add process_stratum_target parameter.
118 (find_thread_ptid(inferior*, ptid_t)): New overload.
119 (find_thread_ptid, thread_change_ptid): Add process_stratum_target
120 parameter.
121 (all_threads()): Delete overload.
122 (all_threads, all_non_exited_threads): Add process_stratum_target
123 parameter.
124 (all_threads_safe): Use brace initialization.
125 (thread_count): Add process_stratum_target parameter.
126 (set_resumed, set_running, set_stop_requested, set_executing)
127 (threads_are_executing, finish_thread_state): Add
128 process_stratum_target parameter.
129 (switch_to_thread): Use is_current_thread.
130 * i386-fbsd-tdep.c: Include "inferior.h".
131 (i386fbsd_get_thread_local_address): Pass down target.
132 * i386-linux-nat.c (i386_linux_nat_target::low_resume): Adjust.
133 * inf-child.c (inf_child_target::maybe_unpush_target): Remove
134 have_inferiors check.
135 * inf-ptrace.c (inf_ptrace_target::create_inferior)
136 (inf_ptrace_target::attach): Adjust.
137 * infcall.c (run_inferior_call): Adjust.
138 * infcmd.c (run_command_1): Pass target to
139 scoped_finish_thread_state.
140 (proceed_thread_callback): Skip inferiors with no execution.
141 (continue_command): Rename 'all_threads' local to avoid hiding
142 'all_threads' function. Adjust get_last_target_status call.
143 (prepare_one_step): Adjust set_running call.
144 (signal_command): Use user_visible_resume_target. Compare thread
145 pointers instead of inferior_ptid.
146 (info_program_command): Adjust to pass down target.
147 (attach_command): Mark target's 'thread_executing' flag.
148 (stop_current_target_threads_ns): New, factored out from ...
149 (interrupt_target_1): ... this. Switch inferior before making
150 target calls.
151 * inferior-iter.h
152 (struct all_inferiors_iterator, struct all_inferiors_range)
153 (struct all_inferiors_safe_range)
154 (struct all_non_exited_inferiors_range): Filter on
155 process_stratum_target too. Remove explicit.
156 * inferior.c (inferior::inferior): Push dummy target on target
157 stack.
158 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors):
159 Add process_stratum_target parameter, and pass it down.
160 (have_live_inferiors): Adjust.
161 (switch_to_inferior_and_push_target): New.
162 (add_inferior_command, clone_inferior_command): Handle
163 "-no-connection" parameter. Use
164 switch_to_inferior_and_push_target.
165 (_initialize_inferior): Mention "-no-connection" option in
166 the help of "add-inferior" and "clone-inferior" commands.
167 * inferior.h: Include "process-stratum-target.h".
168 (interrupt_target_1): Use bool.
169 (struct inferior) <push_target, unpush_target, target_is_pushed,
170 find_target_beneath, top_target, process_target, target_at,
171 m_stack>: New.
172 (discard_all_inferiors): Delete.
173 (find_inferior_pid, find_inferior_ptid, number_of_live_inferiors)
174 (all_inferiors, all_non_exited_inferiors): Add
175 process_stratum_target parameter.
176 * infrun.c: Include "gdb_select.h" and <unordered_map>.
177 (target_last_proc_target): New global.
178 (follow_fork_inferior): Push target on new inferior. Pass target
179 to add_thread_silent. Call exec_on_vfork. Handle target's
180 reference count.
181 (follow_fork): Adjust get_last_target_status call. Also consider
182 target.
183 (follow_exec): Push target on new inferior.
184 (struct execution_control_state) <target>: New field.
185 (user_visible_resume_target): New.
186 (do_target_resume): Call target_async.
187 (resume_1): Set target's threads_executing flag. Consider resume
188 target.
189 (commit_resume_all_targets): New.
190 (proceed): Also consider resume target. Skip threads of inferiors
191 with no execution. Commit resumtion in all targets.
192 (start_remote): Pass current inferior to wait_for_inferior.
193 (infrun_thread_stop_requested): Consider target as well. Pass
194 thread_info pointer to clear_inline_frame_state instead of ptid.
195 (infrun_thread_thread_exit): Consider target as well.
196 (random_pending_event_thread): New inferior parameter. Use it.
197 (do_target_wait): Rename to ...
198 (do_target_wait_1): ... this. Add inferior parameter, and pass it
199 down.
200 (threads_are_resumed_pending_p, do_target_wait): New.
201 (prepare_for_detach): Adjust calls.
202 (wait_for_inferior): New inferior parameter. Handle it. Use
203 do_target_wait_1 instead of do_target_wait.
204 (fetch_inferior_event): Adjust. Switch to representative
205 inferior. Pass target down.
206 (set_last_target_status): Add process_stratum_target parameter.
207 Save target in global.
208 (get_last_target_status): Add process_stratum_target parameter and
209 handle it.
210 (nullify_last_target_wait_ptid): Clear 'target_last_proc_target'.
211 (context_switch): Check inferior_ptid == null_ptid before calling
212 inferior_thread().
213 (get_inferior_stop_soon): Pass down target.
214 (wait_one): Rename to ...
215 (poll_one_curr_target): ... this.
216 (struct wait_one_event): New.
217 (wait_one): New.
218 (stop_all_threads): Adjust.
219 (handle_no_resumed, handle_inferior_event): Adjust to consider the
220 event's target.
221 (switch_back_to_stepped_thread): Also consider target.
222 (print_stop_event): Update.
223 (normal_stop): Update. Also consider the resume target.
224 * infrun.h (wait_for_inferior): Remove declaration.
225 (user_visible_resume_target): New declaration.
226 (get_last_target_status, set_last_target_status): New
227 process_stratum_target parameter.
228 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
229 process_stratum_target parameter, and use it.
230 (clear_inline_frame_state (thread_info*)): New.
231 * inline-frame.c (clear_inline_frame_state(ptid_t)): Add
232 process_stratum_target parameter.
233 (clear_inline_frame_state (thread_info*)): Declare.
234 * linux-fork.c (delete_checkpoint_command): Pass target down to
235 find_thread_ptid.
236 (checkpoint_command): Adjust.
237 * linux-nat.c (linux_nat_target::follow_fork): Switch to thread
238 instead of just tweaking inferior_ptid.
239 (linux_nat_switch_fork): Pass target down to thread_change_ptid.
240 (exit_lwp): Pass target down to find_thread_ptid.
241 (attach_proc_task_lwp_callback): Pass target down to
242 add_thread/set_running/set_executing.
243 (linux_nat_target::attach): Pass target down to
244 thread_change_ptid.
245 (get_detach_signal): Pass target down to find_thread_ptid.
246 Consider last target status's target.
247 (linux_resume_one_lwp_throw, resume_lwp)
248 (linux_handle_syscall_trap, linux_handle_extended_wait, wait_lwp)
249 (stop_wait_callback, save_stop_reason, linux_nat_filter_event)
250 (linux_nat_wait_1, resume_stopped_resumed_lwps): Pass target down.
251 (linux_nat_target::async_wait_fd): New.
252 (linux_nat_stop_lwp, linux_nat_target::thread_address_space): Pass
253 target down.
254 * linux-nat.h (linux_nat_target::async_wait_fd): Declare.
255 * linux-tdep.c (get_thread_arch_regcache): Pass target down.
256 * linux-thread-db.c (struct thread_db_info::process_target): New
257 field.
258 (add_thread_db_info): Save target.
259 (get_thread_db_info): New process_stratum_target parameter. Also
260 match target.
261 (delete_thread_db_info): New process_stratum_target parameter.
262 Also match target.
263 (thread_from_lwp): Adjust to pass down target.
264 (thread_db_notice_clone): Pass down target.
265 (check_thread_db_callback): Pass down target.
266 (try_thread_db_load_1): Always push the thread_db target.
267 (try_thread_db_load, record_thread): Pass target down.
268 (thread_db_target::detach): Pass target down. Always unpush the
269 thread_db target.
270 (thread_db_target::wait, thread_db_target::mourn_inferior): Pass
271 target down. Always unpush the thread_db target.
272 (find_new_threads_callback, thread_db_find_new_threads_2)
273 (thread_db_target::update_thread_list): Pass target down.
274 (thread_db_target::pid_to_str): Pass current inferior down.
275 (thread_db_target::get_thread_local_address): Pass target down.
276 (thread_db_target::resume, maintenance_check_libthread_db): Pass
277 target down.
278 * nto-procfs.c (nto_procfs_target::update_thread_list): Adjust.
279 * procfs.c (procfs_target::procfs_init_inferior): Declare.
280 (proc_set_current_signal, do_attach, procfs_target::wait): Adjust.
281 (procfs_init_inferior): Rename to ...
282 (procfs_target::procfs_init_inferior): ... this and adjust.
283 (procfs_target::create_inferior, procfs_notice_thread)
284 (procfs_do_thread_registers): Adjust.
285 * ppc-fbsd-tdep.c: Include "inferior.h".
286 (ppcfbsd_get_thread_local_address): Pass down target.
287 * proc-service.c (ps_xfer_memory): Switch current inferior and
288 program space as well.
289 (get_ps_regcache): Pass target down.
290 * process-stratum-target.c
291 (process_stratum_target::thread_address_space)
292 (process_stratum_target::thread_architecture): Pass target down.
293 * process-stratum-target.h
294 (process_stratum_target::threads_executing): New field.
295 (as_process_stratum_target): New.
296 * ravenscar-thread.c
297 (ravenscar_thread_target::update_inferior_ptid): Pass target down.
298 (ravenscar_thread_target::wait, ravenscar_add_thread): Pass target
299 down.
300 * record-btrace.c (record_btrace_target::info_record): Adjust.
301 (record_btrace_target::record_method)
302 (record_btrace_target::record_is_replaying)
303 (record_btrace_target::fetch_registers)
304 (get_thread_current_frame_id, record_btrace_target::resume)
305 (record_btrace_target::wait, record_btrace_target::stop): Pass
306 target down.
307 * record-full.c (record_full_wait_1): Switch to event thread.
308 Pass target down.
309 * regcache.c (regcache::regcache)
310 (get_thread_arch_aspace_regcache, get_thread_arch_regcache): Add
311 process_stratum_target parameter and handle it.
312 (current_thread_target): New global.
313 (get_thread_regcache): Add process_stratum_target parameter and
314 handle it. Switch inferior before calling target method.
315 (get_thread_regcache): Pass target down.
316 (get_thread_regcache_for_ptid): Pass target down.
317 (registers_changed_ptid): Add process_stratum_target parameter and
318 handle it.
319 (registers_changed_thread, registers_changed): Pass target down.
320 (test_get_thread_arch_aspace_regcache): New.
321 (current_regcache_test): Define a couple local test_target_ops
322 instances and use them for testing.
323 (readwrite_regcache): Pass process_stratum_target parameter.
324 (cooked_read_test, cooked_write_test): Pass mock_target down.
325 * regcache.h (get_thread_regcache, get_thread_arch_regcache)
326 (get_thread_arch_aspace_regcache): Add process_stratum_target
327 parameter.
328 (regcache::target): New method.
329 (regcache::regcache, regcache::get_thread_arch_aspace_regcache)
330 (regcache::registers_changed_ptid): Add process_stratum_target
331 parameter.
332 (regcache::m_target): New field.
333 (registers_changed_ptid): Add process_stratum_target parameter.
334 * remote.c (remote_state::supports_vCont_probed): New field.
335 (remote_target::async_wait_fd): New method.
336 (remote_unpush_and_throw): Add remote_target parameter.
337 (get_current_remote_target): Adjust.
338 (remote_target::remote_add_inferior): Push target.
339 (remote_target::remote_add_thread)
340 (remote_target::remote_notice_new_inferior)
341 (get_remote_thread_info): Pass target down.
342 (remote_target::update_thread_list): Skip threads of inferiors
343 bound to other targets. (remote_target::close): Don't discard
344 inferiors. (remote_target::add_current_inferior_and_thread)
345 (remote_target::process_initial_stop_replies)
346 (remote_target::start_remote)
347 (remote_target::remote_serial_quit_handler): Pass down target.
348 (remote_target::remote_unpush_target): New remote_target
349 parameter. Unpush the target from all inferiors.
350 (remote_target::remote_unpush_and_throw): New remote_target
351 parameter. Pass it down.
352 (remote_target::open_1): Check whether the current inferior has
353 execution instead of checking whether any inferior is live. Pass
354 target down.
355 (remote_target::remote_detach_1): Pass down target. Use
356 remote_unpush_target.
357 (extended_remote_target::attach): Pass down target.
358 (remote_target::remote_vcont_probe): Set supports_vCont_probed.
359 (remote_target::append_resumption): Pass down target.
360 (remote_target::append_pending_thread_resumptions)
361 (remote_target::remote_resume_with_hc, remote_target::resume)
362 (remote_target::commit_resume): Pass down target.
363 (remote_target::remote_stop_ns): Check supports_vCont_probed.
364 (remote_target::interrupt_query)
365 (remote_target::remove_new_fork_children)
366 (remote_target::check_pending_events_prevent_wildcard_vcont)
367 (remote_target::remote_parse_stop_reply)
368 (remote_target::process_stop_reply): Pass down target.
369 (first_remote_resumed_thread): New remote_target parameter. Pass
370 it down.
371 (remote_target::wait_as): Pass down target.
372 (unpush_and_perror): New remote_target parameter. Pass it down.
373 (remote_target::readchar, remote_target::remote_serial_write)
374 (remote_target::getpkt_or_notif_sane_1)
375 (remote_target::kill_new_fork_children, remote_target::kill): Pass
376 down target.
377 (remote_target::mourn_inferior): Pass down target. Use
378 remote_unpush_target.
379 (remote_target::core_of_thread)
380 (remote_target::remote_btrace_maybe_reopen): Pass down target.
381 (remote_target::pid_to_exec_file)
382 (remote_target::thread_handle_to_thread_info): Pass down target.
383 (remote_target::async_wait_fd): New.
384 * riscv-fbsd-tdep.c: Include "inferior.h".
385 (riscv_fbsd_get_thread_local_address): Pass down target.
386 * sol2-tdep.c (sol2_core_pid_to_str): Pass down target.
387 * sol-thread.c (sol_thread_target::wait, ps_lgetregs, ps_lsetregs)
388 (ps_lgetfpregs, ps_lsetfpregs, sol_update_thread_list_callback):
389 Adjust.
390 * solib-spu.c (spu_skip_standalone_loader): Pass down target.
391 * solib-svr4.c (enable_break): Pass down target.
392 * spu-multiarch.c (parse_spufs_run): Pass down target.
393 * spu-tdep.c (spu2ppu_sniffer): Pass down target.
394 * target-delegates.c: Regenerate.
395 * target.c (g_target_stack): Delete.
396 (current_top_target): Return the current inferior's top target.
397 (target_has_execution_1): Refer to the passed-in inferior's top
398 target.
399 (target_supports_terminal_ours): Check whether the initial
400 inferior was already created.
401 (decref_target): New.
402 (target_stack::push): Incref/decref the target.
403 (push_target, push_target, unpush_target): Adjust.
404 (target_stack::unpush): Defref target.
405 (target_is_pushed): Return bool. Adjust to refer to the current
406 inferior's target stack.
407 (dispose_inferior): Delete, and inline parts ...
408 (target_preopen): ... here. Only dispose of the current inferior.
409 (target_detach): Hold strong target reference while detaching.
410 Pass target down.
411 (target_thread_name): Add assertion.
412 (target_resume): Pass down target.
413 (target_ops::beneath, find_target_at): Adjust to refer to the
414 current inferior's target stack.
415 (get_dummy_target): New.
416 (target_pass_ctrlc): Pass the Ctrl-C to the first inferior that
417 has a thread running.
418 (initialize_targets): Rename to ...
419 (_initialize_target): ... this.
420 * target.h: Include "gdbsupport/refcounted-object.h".
421 (struct target_ops): Inherit refcounted_object.
422 (target_ops::shortname, target_ops::longname): Make const.
423 (target_ops::async_wait_fd): New method.
424 (decref_target): Declare.
425 (struct target_ops_ref_policy): New.
426 (target_ops_ref): New typedef.
427 (get_dummy_target): Declare function.
428 (target_is_pushed): Return bool.
429 * thread-iter.c (all_matching_threads_iterator::m_inf_matches)
430 (all_matching_threads_iterator::all_matching_threads_iterator):
431 Handle filter target.
432 * thread-iter.h (struct all_matching_threads_iterator, struct
433 all_matching_threads_range, class all_non_exited_threads_range):
434 Filter by target too. Remove explicit.
435 * thread.c (threads_executing): Delete.
436 (inferior_thread): Pass down current inferior.
437 (clear_thread_inferior_resources): Pass down thread pointer
438 instead of ptid_t.
439 (add_thread_silent, add_thread_with_info, add_thread): Add
440 process_stratum_target parameter. Use it for thread and inferior
441 searches.
442 (is_current_thread): New.
443 (thread_info::deletable): Use it.
444 (find_thread_ptid, thread_count, in_thread_list)
445 (thread_change_ptid, set_resumed, set_running): New
446 process_stratum_target parameter. Pass it down.
447 (set_executing): New process_stratum_target parameter. Pass it
448 down. Adjust reference to 'threads_executing'.
449 (threads_are_executing): New process_stratum_target parameter.
450 Adjust reference to 'threads_executing'.
451 (set_stop_requested, finish_thread_state): New
452 process_stratum_target parameter. Pass it down.
453 (switch_to_thread): Also match inferior.
454 (switch_to_thread): New process_stratum_target parameter. Pass it
455 down.
456 (update_threads_executing): Reimplement.
457 * top.c (quit_force): Pop targets from all inferior.
458 (gdb_init): Don't call initialize_targets.
459 * windows-nat.c (windows_nat_target) <get_windows_debug_event>:
460 Declare.
461 (windows_add_thread, windows_delete_thread): Adjust.
462 (get_windows_debug_event): Rename to ...
463 (windows_nat_target::get_windows_debug_event): ... this. Adjust.
464 * tracefile-tfile.c (tfile_target_open): Pass down target.
465 * gdbsupport/common-gdbthread.h (struct process_stratum_target):
466 Forward declare.
467 (switch_to_thread): Add process_stratum_target parameter.
468 * mi/mi-interp.c (mi_on_resume_1): Add process_stratum_target
469 parameter. Use it.
470 (mi_on_resume): Pass target down.
471 * nat/fork-inferior.c (startup_inferior): Add
472 process_stratum_target parameter. Pass it down.
473 * nat/fork-inferior.h (startup_inferior): Add
474 process_stratum_target parameter.
475 * python/py-threadevent.c (py_get_event_thread): Pass target down.
476
477 2020-01-10 Pedro Alves <palves@redhat.com>
478
479 * remote.c (remote_target::start_remote): Don't set inferior_ptid
480 directly. Instead find the first thread in the thread list and
481 use switch_to_thread.
482
483 2020-01-10 Pedro Alves <palves@redhat.com>
484
485 * remote.c (remote_target::remote_add_inferior): Don't bind a
486 process to the current inferior if the current inferior is already
487 bound to a process.
488
489 2020-01-10 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
490 Pedro Alves <palves@redhat.com>
491
492 * remote.c (remote_target::remote_parse_stop_reply) <W/X packets>:
493 If no process is specified, return null_ptid instead of
494 inferior_ptid.
495 (remote_target::wait_as): Handle TARGET_WAITKIND_EXITED /
496 TARGET_WAITKIND_SIGNALLED with no pid.
497
498 2020-01-10 Pedro Alves <palves@redhat.com>
499
500 * remote.c (first_remote_resumed_thread): New.
501 (remote_target::wait_as): Use it as default event_ptid instead of
502 inferior_ptid.
503
504 2020-01-10 Pedro Alves <palves@redhat.com>
505
506 * infrun.c (handle_no_resumed): Use all_non_exited_inferiors.
507
508 2020-01-10 Pedro Alves <palves@redhat.com>
509
510 * tracefile-tfile.c (tfile_target::close): Assert that trace_fd is
511 not -1.
512
513 2020-01-10 Pedro Alves <palves@redhat.com>
514
515 * break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
516 ptid to get_last_target_status.
517 * break-catch-syscall.c (print_it_catch_syscall): Don't pass a
518 ptid to get_last_target_status.
519 * infcmd.c (continue_command): Don't pass a target_waitstatus to
520 get_last_target_status.
521 (info_program_command): Don't pass a target_waitstatus to
522 get_last_target_status.
523 * infrun.c (init_wait_for_inferior): Use
524 nullify_last_target_wait_ptid.
525 (get_last_target_status): Handle nullptr arguments.
526 (nullify_last_target_wait_ptid): Clear target_last_waitstatus.
527 (print_stop_event): Don't pass a ptid to get_last_target_status.
528 (normal_stop): Don't pass a ptid to get_last_target_status.
529 * infrun.h (get_last_target_status, set_last_target_status): Move
530 comments here and update.
531 (nullify_last_target_wait_ptid): Declare.
532 * linux-fork.c (fork_load_infrun_state): Remove local extern
533 declaration of nullify_last_target_wait_ptid.
534 * linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
535 to get_last_target_status.
536
537 2020-01-10 Pedro Alves <palves@redhat.com>
538
539 * gdbthread.h (scoped_restore_current_thread)
540 <dont_restore, restore, m_dont_restore>: Declare.
541 * thread.c (thread_alive): Add assertion. Return bool.
542 (switch_to_thread_if_alive): New.
543 (prune_threads): Switch inferior/thread.
544 (print_thread_info_1): Switch thread before calling target methods.
545 (scoped_restore_current_thread::restore): New, factored out from
546 ...
547 (scoped_restore_current_thread::~scoped_restore_current_thread):
548 ... this.
549 (scoped_restore_current_thread::scoped_restore_current_thread):
550 Add assertion.
551 (thread_apply_all_command, thread_select): Use
552 switch_to_thread_if_alive.
553 * infrun.c (proceed, restart_threads, handle_signal_stop)
554 (switch_back_to_stepped_thread): Switch current thread before
555 calling target methods.
556
557 2020-01-10 Pedro Alves <palves@redhat.com>
558
559 * inferior.c (switch_to_inferior_no_thread): New function,
560 factored out from ...
561 (inferior_command): ... here.
562 * inferior.h (switch_to_inferior_no_thread): Declare.
563 * mi/mi-main.c (run_one_inferior): Use
564 switch_to_inferior_no_thread.
565
566 2020-01-10 Pedro Alves <palves@redhat.com>
567
568 * infcmd.c (kill_command): Remove dead code.
569
570 2020-01-10 Pedro Alves <palves@redhat.com>
571
572 * remote.c (remote_target::mourn_inferior): No longer check
573 whether the target is running.
574
575 2020-01-10 Pedro Alves <palves@redhat.com>
576
577 * corelow.c (core_target::has_execution): Change parameter type to
578 inferior pointer.
579 * inferior.c (number_of_live_inferiors): Use
580 inferior::has_execution instead of target_has_execution_1.
581 * inferior.h (inferior::has_execution): New.
582 * linux-thread-db.c (thread_db_target::update_thread_list): Use
583 inferior::has_execution instead of target_has_execution_1.
584 * process-stratum-target.c
585 (process_stratum_target::has_execution): Change parameter type to
586 inferior pointer. Check the inferior's PID instead of
587 inferior_ptid.
588 * process-stratum-target.h
589 (process_stratum_target::has_execution): Change parameter type to
590 inferior pointer.
591 * record-full.c (record_full_core_target::has_execution): Change
592 parameter type to inferior pointer.
593 * target.c (target_has_execution_1): Change parameter type to
594 inferior pointer.
595 (target_has_execution_current): Adjust.
596 * target.h (target_ops::has_execution): Change parameter type to
597 inferior pointer.
598 (target_has_execution_1): Change parameter type to inferior
599 pointer. Change return type to bool.
600 * tracefile.h (tracefile_target::has_execution): Change parameter
601 type to inferior pointer.
602
603 2020-01-10 Pedro Alves <palves@redhat.com>
604
605 * exceptions.c (print_flush): Remove current_top_target() check.
606
607 2020-01-10 Pedro Alves <palves@redhat.com>
608
609 * remote.c (show_remote_exec_file): Show the current inferior's
610 exec-file instead of the command variable's value.
611
612 2020-01-10 Pedro Alves <palves@redhat.com>
613
614 * record-full.c (record_full_resume_ptid): New global.
615 (record_full_target::resume): Set it.
616 (record_full_wait_1): Use record_full_resume_ptid instead of
617 inferior_ptid.
618
619 2020-01-10 Pedro Alves <palves@redhat.com>
620
621 * gdbthread.h (scoped_restore_current_thread)
622 <dont_restore, restore, m_dont_restore>: Declare.
623 * thread.c (thread_alive): Add assertion. Return bool.
624 (switch_to_thread_if_alive): New.
625 (prune_threads): Switch inferior/thread.
626 (print_thread_info_1): Switch thread before calling target methods.
627 (scoped_restore_current_thread::restore): New, factored out from
628 ...
629 (scoped_restore_current_thread::~scoped_restore_current_thread):
630 ... this.
631 (scoped_restore_current_thread::scoped_restore_current_thread):
632 Add assertion.
633 (thread_apply_all_command, thread_select): Use
634 switch_to_thread_if_alive.
635
636 2020-01-10 George Barrett <bob@bob131.so>
637
638 * stap-probe.c (stap_modify_semaphore): Don't check for null
639 semaphores.
640 (stap_probe::set_semaphore, stap_probe::clear_semaphore): Check
641 for null semaphores.
642
643 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
644
645 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Update
646 all source windows, and maintain horizontal scroll status while
647 doing so.
648
649 2020-01-09 Tom Tromey <tom@tromey.com>
650
651 PR tui/18932:
652 * tui/tui-source.c (tui_source_window::do_scroll_vertical): Call
653 update_source_window, not print_source_lines.
654
655 2020-01-09 Andrew Burgess <andrew.burgess@embecosm.com>
656
657 * tui/tui.c (tui_enable): Register tui hooks after calling
658 tui_display_main.
659
660 2020-01-09 Christian Biesinger <cbiesinger@google.com>
661
662 * gdbsupport/common-defs.h: Don't define _FORTIFY_SOURCE on MinGW.
663
664 2020-01-08 Simon Marchi <simon.marchi@efficios.com>
665
666 * thread.c (print_thread_info_1): Fix indentation.
667
668 2020-01-09 Christian Biesinger <cbiesinger@google.com>
669
670 * symtab.c (general_symbol_info::compute_and_set_names): Move the
671 unique_xmalloc_ptr outside the if to always free the demangled name.
672
673 2020-01-08 Tom Tromey <tromey@adacore.com>
674
675 * xcoffread.c (enter_line_range, read_xcoff_symtab)
676 (process_xcoff_symbol, xcoff_symfile_offsets): Update.
677 * symtab.h (MSYMBOL_VALUE_ADDRESS): Update.
678 (struct section_offsets, ANOFFSET, SIZEOF_N_SECTION_OFFSETS):
679 Remove.
680 (section_offsets): New typedef.
681 * symtab.c (fixup_section, get_msymbol_address): Update.
682 * symmisc.c (dump_msymbols): Update.
683 * symfile.h (relative_addr_info_to_section_offsets)
684 (symfile_map_offsets_to_segments): Update.
685 * symfile.c (build_section_addr_info_from_objfile)
686 (init_objfile_sect_indices): Update.
687 (struct place_section_arg): Change type of "offsets".
688 (place_section): Update.
689 (relative_addr_info_to_section_offsets): Change type of
690 "section_offsets". Remove "num_sections" parameter.
691 (default_symfile_offsets, syms_from_objfile_1)
692 (set_objfile_default_section_offset): Update.
693 (reread_symbols): No need to preserve section offsets by hand.
694 (symfile_map_offsets_to_segments): Change type of "offsets".
695 * stap-probe.c (relocate_address): Update.
696 * stabsread.h (process_one_symbol): Update.
697 * solib-target.c (struct lm_info_target) <offsets>: Change type.
698 (solib_target_relocate_section_addresses): Update.
699 * solib-svr4.c (enable_break, svr4_relocate_main_executable):
700 Update.
701 * solib-frv.c (frv_relocate_main_executable): Update.
702 * solib-dsbt.c (dsbt_relocate_main_executable): Update.
703 * solib-aix.c (solib_aix_get_section_offsets): Change return
704 type.
705 (solib_aix_solib_create_inferior_hook): Update.
706 * remote.c (remote_target::get_offsets): Update.
707 * psymtab.c (find_pc_sect_psymtab): Update.
708 * psympriv.h (struct partial_symbol) <address, text_low,
709 text_high>: Update.
710 * objfiles.h (obj_section_offset): Update.
711 (struct objfile) <section_offsets>: Change type.
712 <num_sections>: Remove.
713 (objfile_relocate): Update.
714 * objfiles.c (entry_point_address_query): Update
715 (relocate_one_symbol): Change type of "section_offsets".
716 (objfile_relocate1, objfile_relocate1): Change type of
717 "new_offsets".
718 (objfile_rebase1): Update.
719 * mipsread.c (mipscoff_symfile_read): Update.
720 (read_alphacoff_dynamic_symtab): Remove "section_offsets"
721 parameter.
722 * mdebugread.c (parse_symbol): Change type of "section_offsets".
723 (parse_external, psymtab_to_symtab_1): Update.
724 * machoread.c (macho_symfile_offsets): Update.
725 * ia64-tdep.c (ia64_find_unwind_table): Update.
726 * hppa-tdep.c (read_unwind_info): Update.
727 * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Update.
728 * dwarf2read.c (create_addrmap_from_index)
729 (create_addrmap_from_aranges, dw2_find_pc_sect_compunit_symtab)
730 (process_psymtab_comp_unit_reader, add_partial_symbol)
731 (add_partial_subprogram, process_full_comp_unit)
732 (read_file_scope, read_func_scope, read_lexical_block_scope)
733 (read_call_site_scope, dwarf2_rnglists_process)
734 (dwarf2_ranges_process, dwarf2_ranges_read)
735 (dwarf_decode_lines_1, var_decode_location, new_symbol)
736 (dwarf2_fetch_die_loc_sect_off, dwarf2_per_cu_text_offset):
737 Update.
738 * dwarf2-frame.c (execute_cfa_program, dwarf2_frame_find_fde):
739 Update.
740 * dtrace-probe.c (dtrace_probe::get_relocated_address): Update.
741 * dbxread.c (read_dbx_symtab, read_ofile_symtab): Update.
742 (process_one_symbol): Change type of "section_offsets".
743 * ctfread.c (get_objfile_text_range): Update.
744 * coffread.c (coff_symtab_read, enter_linenos)
745 (process_coff_symbol): Update.
746 * coff-pe-read.c (add_pe_forwarded_sym): Update.
747 * amd64-windows-tdep.c (amd64_windows_find_unwind_info): Update.
748
749 2020-01-08 Tom Tromey <tromey@adacore.com>
750
751 * dwarf2read.c (parse_macro_definition): Use std::string.
752 (parse_macro_definition): Likewise.
753
754 2020-01-08 Tom Tromey <tromey@adacore.com>
755
756 * dwarf2read.c (abbrev_table_read_table): Use std::vector.
757 (ATTR_ALLOC_CHUNK): Remove.
758
759 2020-01-08 Tom Tromey <tromey@adacore.com>
760
761 * dwarf2read.c (fixup_go_packaging): Use unique_xmalloc_ptr.
762
763 2020-01-08 Tom Tromey <tromey@adacore.com>
764
765 * dwarf2read.c (add_partial_symbol): Use unique_xmalloc_ptr.
766 (dwarf2_compute_name, open_dwo_file): Likewise.
767 (process_enumeration_scope): Use std::vector.
768 (guess_partial_die_structure_name): Use unique_xmalloc_ptr.
769 (partial_die_info::fixup, dwarf2_start_subfile)
770 (guess_full_die_structure_name, dwarf2_name): Likewise.
771 (determine_prefix): Update.
772 (guess_full_die_structure_name): Make return type const.
773 (partial_die_full_name): Return unique_xmalloc_ptr.
774 (DW_FIELD_ALLOC_CHUNK): Remove.
775
776 2020-01-07 Tom Tromey <tromey@adacore.com>
777
778 PR build/24937:
779 * stap-probe.c (class stap_static_probe_ops): Add constructor.
780
781 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
782
783 * cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
784
785 2020-01-06 Andrew Burgess <andrew.burgess@embecosm.com>
786
787 * stack.c (print_frame_info): Move disassemble_next_line code
788 inside source_print block.
789
790 2020-01-06 Eli Zaretskii <eliz@gnu.org>
791
792 * gdbsupport/gdb_wait.c: Include <signal.h> instead of
793 gdb/signals.h, as we are now using native signal symbols.
794
795 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
796
797 * tui/tui-disasm.c (tui_disasm_window::addr_is_displayed): Avoid
798 overflow by an early check of content vs threshold.
799 * tui/tui-source.c (tui_source_window::line_is_displayed):
800 Likewise.
801
802 2020-01-06 Eli Zaretskii <eliz@gnu.org>
803
804 * NEWS: Mention the recent fix of $_exitsignal on MS-Windows.
805
806 2020-01-02 Jon Turney <jon.turney@dronecode.org.uk>
807
808 * coff-pe-read.c (read_pe_exported_syms): Don't try to read the
809 export table if no section contains it's RVA.
810
811 2020-01-06 Eli Zaretskii <eliz@gnu.org>
812
813 * windows-tdep.c: Fix a typo in WINDOWS_SIGABRT.
814
815 2020-01-06 Hannes Domani <ssbssa@yahoo.de>
816
817 * source.c (print_source_lines_base): Set last_line_listed.
818
819 2020-01-06 Shahab Vahedi <shahab@synopsys.com>
820
821 * tui/tui-disasm.c: Remove trailing spaces.
822
823 2020-01-06 Eli Zaretskii <eliz@gnu.org>
824 Pedro Alves <palves@redhat.com>
825
826 * Makefile.in (COMMON_SFILES): Add gdbsupport/gdb_wait.c.
827 * windows-tdep.c: New enumeration of WINDOWS_SIG* signals.
828 (windows_gdb_signal_to_target): New function, uses the above
829 enumeration to convert GDB internal signal codes to equivalent
830 Windows codes.
831 (windows_init_abi): Call set_gdbarch_gdb_signal_to_target.
832 * windows-nat.c: Include "gdb_wait.h".
833 (get_windows_debug_event): Extract the fatal exception from the
834 exit status and convert to the equivalent Posix signal number.
835 * cli/cli-cmds.c (exit_status_set_internal_vars): Account for the
836 possibility that WTERMSIG returns GDB_SIGNAL_UNKNOWN.
837 * gdbsupport/gdb_wait.c: New file, implements
838 windows_status_to_termsig.
839 * gdbsupport/gdb_wait.h (WIFEXITED, WIFSIGNALED, WEXITSTATUS)
840 (WTERMSIG) [__MINGW32__]: Separate definitions for MinGW.
841
842 2020-01-05 Andrew Burgess <andrew.burgess@embecosm.com>
843
844 * tui/tui-layout.c (tui_add_win_to_layout): Use tui_set_layout not
845 show_layout.
846
847 2020-01-05 Luis Machado <luis.machado@linaro.org>
848
849 * aarch64-linux-nat.c
850 (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64
851 and bfd_mach_aarch64.
852
853 2020-01-03 Philippe Waroquiers <philippe.waroquiers@skynet.be>
854
855 * ui-file.c (stdio_file::can_emit_style_escape)
856 (tee_file::can_emit_style_escape): Ensure style is used also on
857 gdb_stderr when gdb_stderr is a tty supporting styling, similarly
858 to gdb_stdout.
859 * main.c (set_gdb_data_directory): Use file style to output the
860 warning that the given pathname is not a directory.
861 * top.c (show_history_filename, gdb_safe_append_history)
862 (show_gdb_datadir): Use file style.
863
864 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
865
866 * solib-target.c (struct lm_info_target):
867 Change offsets to be a unique_xmalloc_ptr.
868 (solib_target_relocate_section_addresses): Update.
869
870 2020-01-03 Hannes Domani <ssbssa@yahoo.de>
871
872 * windows-nat.c (windows_clear_solib): Free so_list linked list.
873
874 2020-01-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
875
876 * MAINTAINERS (Write After Approval): Add myself.
877
878 2020-01-02 Luis Machado <luis.machado@linaro.org>
879
880 * proc-service.c (get_ps_regcache): Remove reference to obsolete
881 Cell BE architecture.
882 * target.h (struct target_ops) <thread_architecture>: Likewise.
883
884 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
885
886 * Makefile.in: Use INSTALL_PROGRAM_ENV.
887
888 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
889
890 * MAINTAINERS (Write After Approval): Add myself.
891
892 2020-01-01 Joel Brobecker <brobecker@adacore.com>
893
894 * gdbarch.sh: Update copyright year range of generated files.
895
896 2020-01-01 Joel Brobecker <brobecker@adacore.com>
897
898 Update copyright year range in all GDB files.
899
900 2020-01-01 Joel Brobecker <brobecker@adacore.com>
901
902 * copyright.py: Convert to Python 3.
903
904 2020-01-01 Joel Brobecker <brobecker@adacore.com>
905
906 * copyright.py: Adapt after move of gnulib directory from gdb
907 directory to toplevel directory.
908
909 2020-01-01 Joel Brobecker <brobecker@adacore.com>
910
911 * copyright.py (main): Exit if run from the wrong directory.
912
913 2020-01-01 Joel Brobecker <brobecker@adacore.com>
914
915 * top.c (print_gdb_version): Change copyright year to 2020.
916
917 2020-01-01 Joel Brobecker <brobecker@adacore.com>
918
919 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2019.
920
921 For older changes see ChangeLog-2019.
922 \f
923 Local Variables:
924 mode: change-log
925 left-margin: 8
926 fill-column: 74
927 version-control: never
928 coding: utf-8
929 End:
This page took 0.047239 seconds and 4 git commands to generate.