aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-01-14 18:55:33 +0000
committerAndrew Cagney <cagney@redhat.com>2005-01-14 18:55:33 +0000
commit8a076db965ba49f891b959752db7c8bb0c524688 (patch)
tree6fc269cd6f5141e52b1f098a206ac3d9cf1782d7 /gdb/cli
parentbc8332bb44886d189fce38b812d6919a157af734 (diff)
downloadgdb-8a076db965ba49f891b959752db7c8bb0c524688.zip
gdb-8a076db965ba49f891b959752db7c8bb0c524688.tar.gz
gdb-8a076db965ba49f891b959752db7c8bb0c524688.tar.bz2
2005-01-13 Andrew Cagney <cagney@gnu.org>
* mi/mi-main.c (mi_execute_command): Print the exception. * cli/cli-interp.c (safe_execute_command): Print the exception. * exceptions.h (exception_print): Declare. * exceptions.c (struct catcher): Add field print_message. (catcher_init): Add parameter print_message, store in the catcher struct. (print_and_throw): Only print the message when print_message. (catch_exceptions_with_msg, catch_errors): Pass print_message=1 to catcher_init. (catch_exception): Pass print_message=0 to catcher_init.
Diffstat (limited to 'gdb/cli')
-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 cb447e3..ac905b2 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;
}