diff options
author | Pedro Alves <palves@redhat.com> | 2020-01-10 20:05:49 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2020-01-10 20:05:49 +0000 |
commit | ab1ddbcf110a3f1ad45e3a346d2da98ffb833dec (patch) | |
tree | 3d34e21db4b21c580811c699fc0a8800367e64aa /gdb/linux-nat.c | |
parent | f3f8ece4b1c77c925d1f1566df0bf632790a4d24 (diff) | |
download | fsf-binutils-gdb-ab1ddbcf110a3f1ad45e3a346d2da98ffb833dec.zip fsf-binutils-gdb-ab1ddbcf110a3f1ad45e3a346d2da98ffb833dec.tar.gz fsf-binutils-gdb-ab1ddbcf110a3f1ad45e3a346d2da98ffb833dec.tar.bz2 |
Some get_last_target_status tweaks
- Make get_last_target_status arguments optional. A following patch
will add another argument to get_last_target_status (the event's
target), and passing nullptr when we don't care for some piece of
info is handier than creating dummy local variables.
- Declare nullify_last_target_wait_ptid in a header, and remove the
local extern declaration from linux-fork.c.
gdb/ChangeLog:
2020-01-10 Pedro Alves <palves@redhat.com>
* break-catch-sig.c (signal_catchpoint_print_it): Don't pass a
ptid to get_last_target_status.
* break-catch-syscall.c (print_it_catch_syscall): Don't pass a
ptid to get_last_target_status.
* infcmd.c (continue_command): Don't pass a target_waitstatus to
get_last_target_status.
(info_program_command): Don't pass a target_waitstatus to
get_last_target_status.
* infrun.c (init_wait_for_inferior): Use
nullify_last_target_wait_ptid.
(get_last_target_status): Handle nullptr arguments.
(nullify_last_target_wait_ptid): Clear target_last_waitstatus.
(print_stop_event): Don't pass a ptid to get_last_target_status.
(normal_stop): Don't pass a ptid to get_last_target_status.
* infrun.h (get_last_target_status, set_last_target_status): Move
comments here and update.
(nullify_last_target_wait_ptid): Declare.
* linux-fork.c (fork_load_infrun_state): Remove local extern
declaration of nullify_last_target_wait_ptid.
* linux-nat.c (get_detach_signal): Don't pass a target_waitstatus
to get_last_target_status.
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 4484fa5..a01839c 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1315,10 +1315,9 @@ get_detach_signal (struct lwp_info *lp) } else if (!target_is_non_stop_p ()) { - struct target_waitstatus last; ptid_t last_ptid; - get_last_target_status (&last_ptid, &last); + get_last_target_status (&last_ptid, nullptr); if (lp->ptid.lwp () == last_ptid.lwp ()) signo = tp->suspend.stop_signal; |