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