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