summaryrefslogtreecommitdiff
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.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index cb447e3ec58..ac905b2bb35 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -125,11 +125,16 @@ do_captured_execute_command (struct ui_out *uiout, void *data)
static struct exception
safe_execute_command (struct ui_out *uiout, char *command, int from_tty)
{
+ struct exception e;
struct captured_execute_command_args args;
args.command = command;
args.from_tty = from_tty;
- return catch_exception (uiout, do_captured_execute_command, &args,
- RETURN_MASK_ALL);
+ e = catch_exception (uiout, do_captured_execute_command, &args,
+ RETURN_MASK_ALL);
+ /* FIXME: cagney/2005-01-13: This shouldn't be needed. Instead the
+ caller should print the exception. */
+ exception_print (gdb_stderr, NULL, e);
+ return e;
}