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