* infrun.c (resume): Discard cleanups on early exit path.
authorVladimir Prus <vladimir@codesourcery.com>
Sat, 12 Jul 2008 13:42:54 +0000 (13:42 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Sat, 12 Jul 2008 13:42:54 +0000 (13:42 +0000)
gdb/ChangeLog
gdb/infrun.c

index 5fed053..89072a6 100644 (file)
@@ -1,5 +1,9 @@
 2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
 
+       * infrun.c (resume): Discard cleanups on early exit path.
+
+2008-07-12  Vladimir Prus  <vladimir@codesourcery.com>
+
         * infrun.c (normal_stop): For MI, report which threads
        were stopped.
 
index 5473c99..07b34fd 100644 (file)
@@ -969,10 +969,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))