]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2008-10-05 Michael Snyder <msnyder@promb-2s-dhcp59.eng.vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Sun, 5 Oct 2008 21:11:53 +0000 (21:11 +0000)
committerMichael Snyder <msnyder@vmware.com>
Sun, 5 Oct 2008 21:11:53 +0000 (21:11 +0000)
* reverse.c (exec_reverse_once): Call do_cleanups explicitly.

gdb/ChangeLog
gdb/reverse.c

index 1179da1c715d05abffd6c147abb489a58250e369..0c0c2d206c2dc99970c52d4f45783f436d65663a 100644 (file)
@@ -1,5 +1,6 @@
 2008-10-05  Michael Snyder  <msnyder@promb-2s-dhcp59.eng.vmware.com>
 
+       * reverse.c (exec_reverse_once): Call do_cleanups explicitly.
        * infrun.c (handle_inferior_event): Fix typo in comment.
 
 2008-10-04  Michael Snyder  <msnyder@vmware.com>
index 661360c53f7bb3bb85bded680301b669b850fd6a..492706e7d22f5bb1724aad36e83d47942b871adf 100644 (file)
@@ -95,6 +95,7 @@ exec_reverse_once (char *cmd, char *args, int from_tty)
   /* String buffer for command consing.  */
   char reverse_command[512];
   enum exec_direction_kind dir = target_get_execution_direction ();
+  struct cleanup *old_chain;
 
   if (dir == EXEC_ERROR)
     error (_("Target %s does not support this command."), target_shortname);
@@ -106,9 +107,10 @@ exec_reverse_once (char *cmd, char *args, int from_tty)
   if (target_set_execution_direction (EXEC_REVERSE) == EXEC_ERROR)
     error (_("Target %s does not support this command."), target_shortname);
 
-  make_cleanup (exec_direction_default, NULL);
+  old_chain = make_cleanup (exec_direction_default, NULL);
   sprintf (reverse_command, "%s %s", cmd, args ? args : "");
   execute_command (reverse_command, from_tty);
+  do_cleanups (old_chain);
 }
 
 static void