diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-01-13 02:35:39 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-01-13 02:35:39 +0000 |
commit | 766c201383f0a8cdb76ab7c4e0eaaeb631df4810 (patch) | |
tree | 4b8b849b27dde9dfdd9d71d94c6549f0b127c3c2 /gdb/interps.c | |
parent | cdb2edd3ee4edafd355073ad21d5fdfc1b6dee7a (diff) | |
download | gdb-766c201383f0a8cdb76ab7c4e0eaaeb631df4810.tar.gz |
2005-01-12 Andrew Cagney <cagney@gnu.org>
* exceptions.c (exception_none): New variable.
* Makefile.in: Update dependencies.
* interps.c: Include "exceptions.h".
(interpreter_exec_cmd, interp_exec): Update to return "struct
exception"
* exceptions.h (no_exception): Declare.
* tui/tui-interp.c (tui_exec): Update to return "struct exception"
* mi/mi-interp.c: Include "exceptions.h".
(mi_cmd_interpreter_exec, mi_interpreter_exec): Update to return
'struct exception".
* cli/cli-interp.c (cli_interpreter_exec, safe_execute_command)
(do_captured_execute_command): Update to use catch_exception.
* interps.h: Include "exceptions.h".
(interp_exec_ftype, interp_exec): Return "struct exception".
Diffstat (limited to 'gdb/interps.c')
-rw-r--r-- | gdb/interps.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gdb/interps.c b/gdb/interps.c index 2a4cc0b52f6..b93b3f6d4c4 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -42,6 +42,7 @@ #include "gdb-events.h" #include "gdb_assert.h" #include "top.h" /* For command_loop. */ +#include "exceptions.h" struct interp { @@ -304,14 +305,14 @@ interp_exec_p (struct interp *interp) return interp->procs->exec_proc != NULL; } -int +struct exception interp_exec (struct interp *interp, const char *command_str) { if (interp->procs->exec_proc != NULL) { return interp->procs->exec_proc (interp->data, command_str); } - return 0; + return exception_none; } /* A convenience routine that nulls out all the @@ -398,7 +399,8 @@ interpreter_exec_cmd (char *args, int from_tty) for (i = 1; i < nrules; i++) { - if (!interp_exec (interp_to_use, prules[i])) + struct exception e = interp_exec (interp_to_use, prules[i]); + if (!e.reason) { interp_set (old_interp); interp_set_quiet (interp_to_use, old_quiet); |