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/cli | |
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/cli')
-rw-r--r-- | gdb/cli/cli-interp.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c index 35b76229dc3..021b79855d6 100644 --- a/gdb/cli/cli-interp.c +++ b/gdb/cli/cli-interp.c @@ -34,9 +34,8 @@ struct ui_out *cli_uiout; /* These are the ui_out and the interpreter for the console interpreter. */ /* Longjmp-safe wrapper for "execute_command" */ -static int do_captured_execute_command (struct ui_out *uiout, void *data); -static enum gdb_rc safe_execute_command (struct ui_out *uiout, char *command, - int from_tty); +static struct exception safe_execute_command (struct ui_out *uiout, + char *command, int from_tty); struct captured_execute_command_args { char *command; @@ -93,11 +92,11 @@ cli_interpreter_display_prompt_p (void *data) return 1; } -static int +static struct exception cli_interpreter_exec (void *data, const char *command_str) { - int result; struct ui_file *old_stream; + struct exception result; /* FIXME: cagney/2003-02-01: Need to const char *propogate safe_execute_command. */ @@ -115,23 +114,22 @@ cli_interpreter_exec (void *data, const char *command_str) return result; } -static int +static void do_captured_execute_command (struct ui_out *uiout, void *data) { struct captured_execute_command_args *args = (struct captured_execute_command_args *) data; execute_command (args->command, args->from_tty); - return GDB_RC_OK; } -static enum gdb_rc +static struct exception safe_execute_command (struct ui_out *uiout, char *command, int from_tty) { struct captured_execute_command_args args; args.command = command; args.from_tty = from_tty; - return catch_exceptions (uiout, do_captured_execute_command, &args, - NULL, RETURN_MASK_ALL); + return catch_exception (uiout, do_captured_execute_command, &args, + RETURN_MASK_ALL); } |