Split TRY_CATCH into TRY + CATCH
[deliverable/binutils-gdb.git] / gdb / compile / compile-object-run.c
index c40de0ebfd1228877b1475c22bac3e8ea878b745..6738aad9b1e72876d77094ccc74f44e760a81a45 100644 (file)
@@ -87,7 +87,6 @@ compile_object_run (struct compile_module *module)
   struct frame_id dummy_id;
   struct cleanup *cleanups;
   struct do_module_cleanup *data;
-  volatile struct gdb_exception ex;
   const char *objfile_name_s = objfile_name (module->objfile);
   int dtor_found, executed = 0;
   CORE_ADDR func_addr = module->func_addr;
@@ -101,7 +100,7 @@ compile_object_run (struct compile_module *module)
   xfree (module->source_file);
   xfree (module);
 
-  TRY_CATCH (ex, RETURN_MASK_ERROR)
+  TRY
     {
       func_val = value_from_pointer
                 (builtin_type (target_gdbarch ())->builtin_func_ptr,
@@ -121,7 +120,7 @@ compile_object_run (struct compile_module *module)
                                       do_module_cleanup, data);
        }
     }
-  if (ex.reason < 0)
+  CATCH (ex, RETURN_MASK_ERROR)
     {
       /* In the case of DTOR_FOUND or in the case of EXECUTED nothing
         needs to be done.  */
@@ -133,6 +132,7 @@ compile_object_run (struct compile_module *module)
        do_module_cleanup (data);
       throw_exception (ex);
     }
+  END_CATCH
 
   dtor_found = find_dummy_frame_dtor (do_module_cleanup, data);
   gdb_assert (!dtor_found && executed);
This page took 0.027783 seconds and 4 git commands to generate.