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