diff options
author | Pedro Alves <pedro@codesourcery.com> | 2009-10-28 16:32:58 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2009-10-28 16:32:58 +0000 |
commit | a0a686f9b099b8b86b40004421279d40bc4ce39f (patch) | |
tree | 1866ce9ea8a91c47d391178c772bfb0f5fd232d2 /gdb/infrun.c | |
parent | 76ea2a624b6dffd781dc2ee1d5cca9303f180124 (diff) | |
download | gdb-a0a686f9b099b8b86b40004421279d40bc4ce39f.tar.gz |
* infrun.c (keep_going): Wrap with resume_cleanups.
Diffstat (limited to 'gdb/infrun.c')
-rw-r--r-- | gdb/infrun.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 586746a75be..842ff6b52e5 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -4812,6 +4812,10 @@ stop_stepping (struct execution_control_state *ecs) static void keep_going (struct execution_control_state *ecs) { + /* Make sure normal_stop is called if we get a QUIT handled before + reaching resume. */ + struct cleanup *old_cleanups = make_cleanup (resume_cleanups, 0); + /* Save the pc before execution, to compare with pc after stop. */ ecs->event_thread->prev_pc = regcache_read_pc (get_thread_regcache (ecs->ptid)); @@ -4825,6 +4829,8 @@ keep_going (struct execution_control_state *ecs) /* We took a signal (which we are supposed to pass through to the inferior, else we'd not get here) and we haven't yet gotten our trap. Simply continue. */ + + discard_cleanups (old_cleanups); resume (currently_stepping (ecs->event_thread), ecs->event_thread->stop_signal); } @@ -4887,6 +4893,7 @@ keep_going (struct execution_control_state *ecs) && !signal_program[ecs->event_thread->stop_signal]) ecs->event_thread->stop_signal = TARGET_SIGNAL_0; + discard_cleanups (old_cleanups); resume (currently_stepping (ecs->event_thread), ecs->event_thread->stop_signal); } |