aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 7237d2d..ceca807 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -364,9 +364,7 @@ static int
catch_command_errors (catch_command_errors_ftype *command,
char *arg, int from_tty)
{
- volatile struct gdb_exception e;
-
- TRY_CATCH (e, RETURN_MASK_ALL)
+ TRY
{
int was_sync = sync_execution;
@@ -374,7 +372,13 @@ catch_command_errors (catch_command_errors_ftype *command,
maybe_wait_sync_command_done (was_sync);
}
- return handle_command_errors (e);
+ CATCH (e, RETURN_MASK_ALL)
+ {
+ return handle_command_errors (e);
+ }
+ END_CATCH
+
+ return 1;
}
/* Type of the command callback passed to catch_command_errors_const. */
@@ -387,9 +391,7 @@ static int
catch_command_errors_const (catch_command_errors_const_ftype *command,
const char *arg, int from_tty)
{
- volatile struct gdb_exception e;
-
- TRY_CATCH (e, RETURN_MASK_ALL)
+ TRY
{
int was_sync = sync_execution;
@@ -397,7 +399,13 @@ catch_command_errors_const (catch_command_errors_const_ftype *command,
maybe_wait_sync_command_done (was_sync);
}
- return handle_command_errors (e);
+ CATCH (e, RETURN_MASK_ALL)
+ {
+ return handle_command_errors (e);
+ }
+ END_CATCH
+
+ return 1;
}
/* Type of this option. */