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