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