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