S390: Re-arrange implementation of s390_return_value
[deliverable/binutils-gdb.git] / gdb / dwarf2loc.c
index fae67ee2dc99019c0baf39bae875118b42ffbca9..e674933193be0588c408423d0fbb4922de069028 100644 (file)
@@ -41,7 +41,7 @@
 
 extern int dwarf2_always_disassemble;
 
-static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
+extern const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs;
 
 static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
                                                    struct frame_info *frame,
@@ -983,14 +983,13 @@ struct call_site_chain *
 call_site_find_chain (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
                      CORE_ADDR callee_pc)
 {
-  volatile struct gdb_exception e;
   struct call_site_chain *retval = NULL;
 
-  TRY_CATCH (e, RETURN_MASK_ERROR)
+  TRY
     {
       retval = call_site_find_chain_1 (gdbarch, caller_pc, callee_pc);
     }
-  if (e.reason < 0)
+  CATCH (e, RETURN_MASK_ERROR)
     {
       if (e.error == NO_ENTRY_VALUE_ERROR)
        {
@@ -1002,6 +1001,8 @@ call_site_find_chain (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
       else
        throw_exception (e);
     }
+  END_CATCH
+
   return retval;
 }
 
@@ -2151,7 +2152,7 @@ static const struct lval_funcs pieced_value_funcs = {
 
 /* Virtual method table for dwarf2_evaluate_loc_desc_full below.  */
 
-static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs =
+const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs =
 {
   dwarf_expr_read_addr_from_reg,
   dwarf_expr_get_reg_value,
@@ -2183,7 +2184,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
   struct dwarf_expr_context *ctx;
   struct cleanup *old_chain, *value_chain;
   struct objfile *objfile = dwarf2_per_cu_objfile (per_cu);
-  volatile struct gdb_exception ex;
 
   if (byte_offset < 0)
     invalid_synthetic_pointer ();
@@ -2206,11 +2206,11 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
   ctx->baton = &baton;
   ctx->funcs = &dwarf_expr_ctx_funcs;
 
-  TRY_CATCH (ex, RETURN_MASK_ERROR)
+  TRY
     {
       dwarf_expr_eval (ctx, data, size);
     }
-  if (ex.reason < 0)
+  CATCH (ex, RETURN_MASK_ERROR)
     {
       if (ex.error == NOT_AVAILABLE_ERROR)
        {
@@ -2229,6 +2229,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
       else
        throw_exception (ex);
     }
+  END_CATCH
 
   if (ctx->num_pieces > 0)
     {
@@ -2524,7 +2525,7 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
          if (pinfo->type == baton->referenced_type)
            break;
        if (pinfo == NULL)
-         error ("cannot find reference address for offset property");
+         error (_("cannot find reference address for offset property"));
        val = value_at (baton->offset_info.type,
                        pinfo->addr + baton->offset_info.offset);
        *value = value_as_address (val);
This page took 0.037487 seconds and 4 git commands to generate.