aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-interp.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-interp.c')
-rw-r--r--gdb/cli/cli-interp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index 1069018..ce43a4a 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -179,7 +179,6 @@ cli_interpreter_exec (void *data, const char *command_str)
static struct gdb_exception
safe_execute_command (struct ui_out *command_uiout, char *command, int from_tty)
{
- volatile struct gdb_exception exception;
struct gdb_exception e = exception_none;
struct ui_out *saved_uiout;
@@ -187,14 +186,15 @@ safe_execute_command (struct ui_out *command_uiout, char *command, int from_tty)
saved_uiout = current_uiout;
current_uiout = command_uiout;
- TRY_CATCH (exception, RETURN_MASK_ALL)
+ TRY
{
execute_command (command, from_tty);
}
- if (exception.reason < 0)
+ CATCH (exception, RETURN_MASK_ALL)
{
e = exception;
}
+ END_CATCH
/* Restore the global builder. */
current_uiout = saved_uiout;