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>
/* 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);
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