This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[MI non-stop 03/11, RFA] Discard cleanup when deferring displaced step
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 28 Jun 2008 20:39:52 +0400
- Subject: [MI non-stop 03/11, RFA] Discard cleanup when deferring displaced step
My MI non-stop tests (coming later in the series) revealed a bug in displaced
stepping -- we fail to discard cleanup on an early exit path, which caused a
call to normal_stop at very unfortunate time -- when a thread was running.
OK?
- Volodya
* infrun.c (resume): Discard cleanups on early exit path.
---
gdb/infrun.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index cf23c18..e803d1b 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -964,10 +964,13 @@ a command like `return' or `jump' to continue execution."));
&& sig == TARGET_SIGNAL_0)
{
if (!displaced_step_prepare (inferior_ptid))
- /* Got placed in displaced stepping queue. Will be resumed
- later when all the currently queued displaced stepping
- requests finish. */
- return;
+ {
+ /* Got placed in displaced stepping queue. Will be resumed
+ later when all the currently queued displaced stepping
+ requests finish. */
+ discard_cleanups (old_cleanups);
+ return;
+ }
}
if (step && gdbarch_software_single_step_p (gdbarch))
--
1.5.3.5