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