Split TRY_CATCH into TRY + CATCH
[deliverable/binutils-gdb.git] / gdb / main.c
index 7237d2df17a36fa8b242a2b73f83a9802cadebf4..ceca80738ef707d537075f5841413285a14ebde9 100644 (file)
@@ -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.  */
This page took 0.026824 seconds and 4 git commands to generate.