aboutsummaryrefslogtreecommitdiff
path: root/gdb/mi
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/mi')
-rw-r--r--gdb/mi/mi-cmd-break.c5
-rw-r--r--gdb/mi/mi-cmd-stack.c5
-rw-r--r--gdb/mi/mi-interp.c5
-rw-r--r--gdb/mi/mi-main.c10
4 files changed, 10 insertions, 15 deletions
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index 4f25977..bf35891 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -54,15 +54,14 @@ breakpoint_notify (struct breakpoint *b)
{
if (mi_can_breakpoint_notify)
{
- TRY
+ try
{
print_breakpoint (b);
}
- CATCH (ex, RETURN_MASK_ALL)
+ catch (const gdb_exception_RETURN_MASK_ALL &ex)
{
exception_print (gdb_stderr, ex);
}
- END_CATCH
}
}
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 0cec856..c689d49 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -531,7 +531,7 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
stb.printf (_("<error reading variable: %s>"), arg->error);
else
{
- TRY
+ try
{
struct value_print_options opts;
@@ -540,12 +540,11 @@ list_arg_or_local (const struct frame_arg *arg, enum what_to_list what,
common_val_print (arg->val, &stb, 0, &opts,
language_def (SYMBOL_LANGUAGE (arg->sym)));
}
- CATCH (except, RETURN_MASK_ERROR)
+ catch (const gdb_exception_RETURN_MASK_ERROR &except)
{
stb.printf (_("<error reading variable: %s>"),
except.what ());
}
- END_CATCH
}
uiout->field_stream ("value", stb);
}
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 9c20016..26dfc4a 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -823,18 +823,17 @@ mi_print_breakpoint_for_event (struct mi_interp *mi, breakpoint *bp)
ui_out_redirect. */
mi_uiout->redirect (mi->event_channel);
- TRY
+ try
{
scoped_restore restore_uiout
= make_scoped_restore (&current_uiout, mi_uiout);
print_breakpoint (bp);
}
- CATCH (ex, RETURN_MASK_ALL)
+ catch (const gdb_exception_RETURN_MASK_ALL &ex)
{
exception_print (gdb_stderr, ex);
}
- END_CATCH
mi_uiout->redirect (NULL);
}
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 2fbcd65..33cd1f8 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -1938,16 +1938,15 @@ mi_execute_command (const char *cmd, int from_tty)
target_log_command (cmd);
- TRY
+ try
{
command = mi_parse (cmd, &token);
}
- CATCH (exception, RETURN_MASK_ALL)
+ catch (const gdb_exception_RETURN_MASK_ALL &exception)
{
mi_print_exception (token, exception);
xfree (token);
}
- END_CATCH
if (command != NULL)
{
@@ -1966,11 +1965,11 @@ mi_execute_command (const char *cmd, int from_tty)
timestamp (command->cmd_start);
}
- TRY
+ try
{
captured_mi_execute_command (current_uiout, command.get ());
}
- CATCH (result, RETURN_MASK_ALL)
+ catch (const gdb_exception_RETURN_MASK_ALL &result)
{
/* Like in start_event_loop, enable input and force display
of the prompt. Otherwise, any command that calls
@@ -1984,7 +1983,6 @@ mi_execute_command (const char *cmd, int from_tty)
mi_print_exception (command->token, result);
mi_out_rewind (current_uiout);
}
- END_CATCH
bpstat_do_actions ();