diff options
author | Doug Evans <xdje42@gmail.com> | 2014-03-30 12:37:50 -0700 |
---|---|---|
committer | Doug Evans <xdje42@gmail.com> | 2014-03-30 12:37:50 -0700 |
commit | c32c64b7a18f8b1337ed58b285d42763180aee05 (patch) | |
tree | 42f9984bf2b9aa4edadd297caf016edb20c67630 | |
parent | 7c0bc051fcae47b9f8620de156ddd744ec85309d (diff) | |
download | gdb-c32c64b7a18f8b1337ed58b285d42763180aee05.zip gdb-c32c64b7a18f8b1337ed58b285d42763180aee05.tar.gz gdb-c32c64b7a18f8b1337ed58b285d42763180aee05.tar.bz2 |
* infrun.c (set_last_target_status): New function.
(handle_inferior_event): Call it.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/infrun.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4c464e2..25ab6fa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2014-03-30 Doug Evans <xdje42@gmail.com> + * infrun.c (set_last_target_status): New function. + (handle_inferior_event): Call it. + +2014-03-30 Doug Evans <xdje42@gmail.com> + * inferior.h (enum stop_kind): Improve comment. 2014-03-28 Joel Brobecker <brobecker@adacore.com> diff --git a/gdb/infrun.c b/gdb/infrun.c index 8f9e820..31bb132 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2965,6 +2965,15 @@ init_thread_stepping_state (struct thread_info *tss) tss->step_after_step_resume_breakpoint = 0; } +/* Set the cached copy of the last ptid/waitstatus. */ + +static void +set_last_target_status (ptid_t ptid, struct target_waitstatus status) +{ + target_last_wait_ptid = ptid; + target_last_waitstatus = status; +} + /* Return the cached copy of the last pid/waitstatus returned by target_wait()/deprecated_target_wait_hook(). The data is actually cached by handle_inferior_event(), which gets called immediately @@ -3272,8 +3281,7 @@ handle_inferior_event (struct execution_control_state *ecs) } /* Cache the last pid/waitstatus. */ - target_last_wait_ptid = ecs->ptid; - target_last_waitstatus = ecs->ws; + set_last_target_status (ecs->ptid, ecs->ws); /* Always clear state belonging to the previous time we stopped. */ stop_stack_dummy = STOP_NONE; |