diff options
author | Tom Tromey <tromey@redhat.com> | 2011-04-04 18:13:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-04-04 18:13:05 +0000 |
commit | 04bd08de86a7768754137e2c03fa92c3af0140b0 (patch) | |
tree | d275abdef7ef5a3c1f37ec246201f12e417d6f16 /gdb/mi | |
parent | 58438ac18761353e6d8461c914992071d4fcb1d3 (diff) | |
download | gdb-04bd08de86a7768754137e2c03fa92c3af0140b0.zip gdb-04bd08de86a7768754137e2c03fa92c3af0140b0.tar.gz gdb-04bd08de86a7768754137e2c03fa92c3af0140b0.tar.bz2 |
* cli/cli-interp.c (struct captured_execute_command_args):
Remove.
(do_captured_execute_command): Remove.
(safe_execute_command): Use TRY_CATCH.
* cli/cli-script.c (struct wrapped_read_command_file_args):
Remove.
(wrapped_read_command_file): Remove.
(script_from_file): Use TRY_CATCH.
* exceptions.c (catch_exception): Remove.
* exceptions.h (catch_exception): Remove.
(deprecated_throw_reason): Update comment.
* mi/mi-main.c (captured_mi_execute_command): Change 'data'
argument to 'context'.
(mi_execute_command): Use TRY_CATCH.
* remote.c (struct start_remote_args): Remove.
(remote_start_remote): Update; change arguments.
(remote_open_1): Use TRY_CATCH.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index ef6bfc3..6410e97 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -1816,10 +1816,9 @@ mi_cmd_remove_inferior (char *command, char **argv, int argc) prompt, display error). */ static void -captured_mi_execute_command (struct ui_out *uiout, void *data) +captured_mi_execute_command (struct ui_out *uiout, struct mi_parse *context) { struct cleanup *cleanup; - struct mi_parse *context = (struct mi_parse *) data; if (do_timings) current_command_ts = context->cmd_start; @@ -1947,7 +1946,7 @@ mi_execute_command (char *cmd, int from_tty) } else { - struct gdb_exception result; + volatile struct gdb_exception result; ptid_t previous_ptid = inferior_ptid; command->token = token; @@ -1959,8 +1958,10 @@ mi_execute_command (char *cmd, int from_tty) timestamp (command->cmd_start); } - result = catch_exception (uiout, captured_mi_execute_command, command, - RETURN_MASK_ALL); + TRY_CATCH (result, RETURN_MASK_ALL) + { + captured_mi_execute_command (uiout, command); + } if (result.reason < 0) { /* The command execution failed and error() was called |