summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2008-10-06 01:18:50 +0000
committerMichael Snyder <msnyder@specifix.com>2008-10-06 01:18:50 +0000
commit7561d52ad93b3b81eedd03ed4f7e51d772cb0f23 (patch)
tree4baea59007077ea45ea390e543e8231547ab668e
parent5202b160fbd2a6754aded911918da89dbf177360 (diff)
downloadgdb-7561d52ad93b3b81eedd03ed4f7e51d772cb0f23.tar.gz
2008-10-05 Michael Snyder <msnyder@vmware.com>
* reverse.c (exec_reverse_once): Call do_cleanups explicitly. (show_exec_direction_func): Don't error, just inform.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/reverse.c12
2 files changed, 9 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 825735a18d8..88eb812e8e3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,8 @@
2008-10-05 Michael Snyder <msnyder@vmware.com>
+ * reverse.c (exec_reverse_once): Call do_cleanups explicitly.
+ (show_exec_direction_func): Don't error, just inform.
+
* target.c, target.h: Rename execdir to exec_direction.
* record.c, record.h: Ditto.
* reverse.c: Ditto.
diff --git a/gdb/reverse.c b/gdb/reverse.c
index 68f09cd4748..4c50ef153db 100644
--- a/gdb/reverse.c
+++ b/gdb/reverse.c
@@ -55,8 +55,6 @@ set_exec_direction_func (char *args, int from_tty,
if (target_set_execution_direction (dir) != EXEC_ERROR)
return;
}
- error (_("Target `%s' does not support execution-direction."),
- target_shortname);
}
static void
@@ -67,15 +65,15 @@ show_exec_direction_func (struct ui_file *out, int from_tty,
switch (dir) {
case EXEC_FORWARD:
- fprintf_filtered (out, "Forward.\n");
+ fprintf_filtered (out, _("Forward.\n"));
break;
case EXEC_REVERSE:
- fprintf_filtered (out, "Reverse.\n");
+ fprintf_filtered (out, _("Reverse.\n"));
break;
case EXEC_ERROR:
default:
fprintf_filtered (out,
- "Forward (target `%s' does not support exec-direction).\n",
+ _("Forward (target `%s' does not support exec-direction).\n"),
target_shortname);
break;
}
@@ -97,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);
@@ -108,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