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