Don't write to inferior_ptid in corelow.c
[deliverable/binutils-gdb.git] / gdb / dwarf2 / loc.c
index 5692cf0027911ac5414e267df8fa56318459b259..400bb4d16fc7ad7d37bcf03e054d87db96277894 100644 (file)
 #include "gdbsupport/underlying.h"
 #include "gdbsupport/byte-vector.h"
 
-static struct value *dwarf2_evaluate_loc_desc_full (struct type *type,
-                                                   struct frame_info *frame,
-                                                   const gdb_byte *data,
-                                                   size_t size,
-                                                   struct dwarf2_per_cu_data *per_cu,
-                                                   struct type *subobj_type,
-                                                   LONGEST subobj_byte_offset);
+static struct value *dwarf2_evaluate_loc_desc_full
+  (struct type *type, struct frame_info *frame, const gdb_byte *data,
+   size_t size, dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile,
+   struct type *subobj_type, LONGEST subobj_byte_offset);
 
 static struct call_site_parameter *dwarf_expr_reg_to_entry_parameter
     (struct frame_info *frame,
      enum call_site_parameter_kind kind,
      union call_site_parameter_u kind_u,
-     struct dwarf2_per_cu_data **per_cu_return);
+     dwarf2_per_cu_data **per_cu_return,
+     dwarf2_per_objfile **per_objfile_return);
 
 static struct value *indirect_synthetic_pointer
   (sect_offset die, LONGEST byte_offset,
-   struct dwarf2_per_cu_data *per_cu,
+   dwarf2_per_cu_data *per_cu,
+   dwarf2_per_objfile *per_objfile,
    struct frame_info *frame,
    struct type *type, bool resolve_abstract_p = false);
 
@@ -475,7 +474,7 @@ locexpr_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
   SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
     (framefunc, get_frame_pc (frame), &start, &length);
   result = dwarf2_evaluate_loc_desc (type, frame, start, length,
-                                    dlbaton->per_cu);
+                                    dlbaton->per_cu, dlbaton->per_objfile);
 
   /* The DW_AT_frame_base attribute contains a location description which
      computes the base address itself.  However, the call to
@@ -532,7 +531,7 @@ loclist_get_frame_base (struct symbol *framefunc, struct frame_info *frame)
   SYMBOL_BLOCK_OPS (framefunc)->find_frame_base_location
     (framefunc, get_frame_pc (frame), &start, &length);
   result = dwarf2_evaluate_loc_desc (type, frame, start, length,
-                                    dlbaton->per_cu);
+                                    dlbaton->per_cu, dlbaton->per_objfile);
 
   /* The DW_AT_frame_base attribute contains a location description which
      computes the base address itself.  However, the call to
@@ -581,11 +580,11 @@ get_frame_pc_for_per_cu_dwarf_call (void *baton)
 
 static void
 per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
-                  struct dwarf2_per_cu_data *per_cu)
+                  dwarf2_per_cu_data *per_cu, dwarf2_per_objfile *per_objfile)
 {
   struct dwarf2_locexpr_baton block;
 
-  block = dwarf2_fetch_die_loc_cu_off (die_offset, per_cu,
+  block = dwarf2_fetch_die_loc_cu_off (die_offset, per_cu, per_objfile,
                                       get_frame_pc_for_per_cu_dwarf_call,
                                       ctx);
 
@@ -601,9 +600,11 @@ per_cu_dwarf_call (struct dwarf_expr_context *ctx, cu_offset die_offset,
 
 static struct value *
 sect_variable_value (struct dwarf_expr_context *ctx, sect_offset sect_off,
-                    struct dwarf2_per_cu_data *per_cu)
+                    dwarf2_per_cu_data *per_cu,
+                    dwarf2_per_objfile *per_objfile)
 {
-  struct type *die_type = dwarf2_fetch_die_type_sect_off (sect_off, per_cu);
+  struct type *die_type
+    = dwarf2_fetch_die_type_sect_off (sect_off, per_cu, per_objfile);
 
   if (die_type == NULL)
     error (_("Bad DW_OP_GNU_variable_value DIE."));
@@ -616,7 +617,8 @@ sect_variable_value (struct dwarf_expr_context *ctx, sect_offset sect_off,
 
   struct type *type = lookup_pointer_type (die_type);
   struct frame_info *frame = get_selected_frame (_("No frame selected."));
-  return indirect_synthetic_pointer (sect_off, 0, per_cu, frame, type, true);
+  return indirect_synthetic_pointer (sect_off, 0, per_cu, per_objfile, frame,
+                                    type, true);
 }
 
 class dwarf_evaluate_loc_desc : public dwarf_expr_context
@@ -650,9 +652,7 @@ public:
      current thread's thread-local storage with offset OFFSET.  */
   CORE_ADDR get_tls_address (CORE_ADDR offset) override
   {
-    struct objfile *objfile = per_cu->objfile ();
-
-    return target_translate_tls_address (objfile, offset);
+    return target_translate_tls_address (per_objfile->objfile, offset);
   }
 
   /* Helper interface of per_cu_dwarf_call for
@@ -660,7 +660,7 @@ public:
 
   void dwarf_call (cu_offset die_offset) override
   {
-    per_cu_dwarf_call (this, die_offset, per_cu);
+    per_cu_dwarf_call (this, die_offset, per_cu, per_objfile);
   }
 
   /* Helper interface of sect_variable_value for
@@ -668,12 +668,12 @@ public:
 
   struct value *dwarf_variable_value (sect_offset sect_off) override
   {
-    return sect_variable_value (this, sect_off, per_cu);
+    return sect_variable_value (this, sect_off, per_cu, per_objfile);
   }
 
   struct type *get_base_type (cu_offset die_offset, int size) override
   {
-    struct type *result = dwarf2_get_die_type (die_offset, per_cu);
+    struct type *result = dwarf2_get_die_type (die_offset, per_cu, per_objfile);
     if (result == NULL)
       error (_("Could not find type for DW_OP_const_type"));
     if (size != 0 && TYPE_LENGTH (result) != size)
@@ -712,7 +712,8 @@ public:
                                   int deref_size) override
   {
     struct frame_info *caller_frame;
-    struct dwarf2_per_cu_data *caller_per_cu;
+    dwarf2_per_cu_data *caller_per_cu;
+    dwarf2_per_objfile *caller_per_objfile;
     struct call_site_parameter *parameter;
     const gdb_byte *data_src;
     size_t size;
@@ -720,7 +721,8 @@ public:
     caller_frame = get_prev_frame (frame);
 
     parameter = dwarf_expr_reg_to_entry_parameter (frame, kind, kind_u,
-                                                  &caller_per_cu);
+                                                  &caller_per_cu,
+                                                  &caller_per_objfile);
     data_src = deref_size == -1 ? parameter->value : parameter->data_value;
     size = deref_size == -1 ? parameter->value_size : parameter->data_value_size;
 
@@ -729,17 +731,25 @@ public:
       throw_error (NO_ENTRY_VALUE_ERROR,
                   _("Cannot resolve DW_AT_call_data_value"));
 
+    /* We are about to evaluate an expression in the context of the caller
+       of the current frame.  This evaluation context may be different from
+       the current (callee's) context), so temporarily set the caller's context.
+
+       It is possible for the caller to be from a different objfile from the
+       callee if the call is made through a function pointer.  */
     scoped_restore save_frame = make_scoped_restore (&this->frame,
                                                     caller_frame);
     scoped_restore save_per_cu = make_scoped_restore (&this->per_cu,
                                                      caller_per_cu);
     scoped_restore save_obj_addr = make_scoped_restore (&this->obj_address,
                                                        (CORE_ADDR) 0);
+    scoped_restore save_per_objfile = make_scoped_restore (&this->per_objfile,
+                                                          caller_per_objfile);
 
     scoped_restore save_arch = make_scoped_restore (&this->gdbarch);
-    this->gdbarch = per_cu->objfile ()->arch ();
+    this->gdbarch = this->per_objfile->objfile->arch ();
     scoped_restore save_addr_size = make_scoped_restore (&this->addr_size);
-    this->addr_size = per_cu->addr_size ();
+    this->addr_size = this->per_cu->addr_size ();
 
     this->eval (data_src, size);
   }
@@ -865,7 +875,8 @@ call_site_to_target_addr (struct gdbarch *call_site_gdbarch,
        caller_core_addr_type = builtin_type (caller_arch)->builtin_func_ptr;
        val = dwarf2_evaluate_loc_desc (caller_core_addr_type, caller_frame,
                                        dwarf_block->data, dwarf_block->size,
-                                       dwarf_block->per_cu);
+                                       dwarf_block->per_cu,
+                                       dwarf_block->per_objfile);
        /* DW_AT_call_target is a DWARF expression, not a DWARF location.  */
        if (VALUE_LVAL (val) == lval_memory)
          return value_address (val);
@@ -1286,7 +1297,8 @@ static struct call_site_parameter *
 dwarf_expr_reg_to_entry_parameter (struct frame_info *frame,
                                   enum call_site_parameter_kind kind,
                                   union call_site_parameter_u kind_u,
-                                  struct dwarf2_per_cu_data **per_cu_return)
+                                  dwarf2_per_cu_data **per_cu_return,
+                                  dwarf2_per_objfile **per_objfile_return)
 {
   CORE_ADDR func_addr, caller_pc;
   struct gdbarch *gdbarch;
@@ -1377,6 +1389,7 @@ dwarf_expr_reg_to_entry_parameter (struct frame_info *frame,
     }
 
   *per_cu_return = call_site->per_cu;
+  *per_objfile_return = call_site->per_objfile;
   return parameter;
 }
 
@@ -1394,7 +1407,8 @@ static struct value *
 dwarf_entry_parameter_to_value (struct call_site_parameter *parameter,
                                CORE_ADDR deref_size, struct type *type,
                                struct frame_info *caller_frame,
-                               struct dwarf2_per_cu_data *per_cu)
+                               dwarf2_per_cu_data *per_cu,
+                               dwarf2_per_objfile *per_objfile)
 {
   const gdb_byte *data_src;
   gdb_byte *data;
@@ -1415,7 +1429,8 @@ dwarf_entry_parameter_to_value (struct call_site_parameter *parameter,
   memcpy (data, data_src, size);
   data[size] = DW_OP_stack_value;
 
-  return dwarf2_evaluate_loc_desc (type, caller_frame, data, size + 1, per_cu);
+  return dwarf2_evaluate_loc_desc (type, caller_frame, data, size + 1, per_cu,
+                                  per_objfile);
 }
 
 /* VALUE must be of type lval_computed with entry_data_value_funcs.  Perform
@@ -1489,14 +1504,17 @@ value_of_dwarf_reg_entry (struct type *type, struct frame_info *frame,
   struct frame_info *caller_frame = get_prev_frame (frame);
   struct value *outer_val, *target_val, *val;
   struct call_site_parameter *parameter;
-  struct dwarf2_per_cu_data *caller_per_cu;
+  dwarf2_per_cu_data *caller_per_cu;
+  dwarf2_per_objfile *caller_per_objfile;
 
   parameter = dwarf_expr_reg_to_entry_parameter (frame, kind, kind_u,
-                                                &caller_per_cu);
+                                                &caller_per_cu,
+                                                &caller_per_objfile);
 
   outer_val = dwarf_entry_parameter_to_value (parameter, -1 /* deref_size */,
                                              type, caller_frame,
-                                             caller_per_cu);
+                                             caller_per_cu,
+                                             caller_per_objfile);
 
   /* Check if DW_AT_call_data_value cannot be used.  If it should be
      used and it is not available do not fall back to OUTER_VAL - dereferencing
@@ -1510,7 +1528,8 @@ value_of_dwarf_reg_entry (struct type *type, struct frame_info *frame,
   target_val = dwarf_entry_parameter_to_value (parameter,
                                               TYPE_LENGTH (target_type),
                                               target_type, caller_frame,
-                                              caller_per_cu);
+                                              caller_per_cu,
+                                              caller_per_objfile);
 
   val = allocate_computed_value (type, &entry_data_value_funcs,
                                 release_value (target_val).release ());
@@ -1576,7 +1595,8 @@ struct piece_closure
    PIECES.  */
 
 static struct piece_closure *
-allocate_piece_closure (struct dwarf2_per_cu_data *per_cu,
+allocate_piece_closure (dwarf2_per_cu_data *per_cu,
+                       dwarf2_per_objfile *per_objfile,
                        std::vector<dwarf_expr_piece> &&pieces,
                        struct frame_info *frame)
 {
@@ -1584,7 +1604,7 @@ allocate_piece_closure (struct dwarf2_per_cu_data *per_cu,
 
   c->refc = 1;
   /* We must capture this here due to sharing of DWARF state.  */
-  c->per_objfile = per_cu->dwarf2_per_objfile;
+  c->per_objfile = per_objfile;
   c->per_cu = per_cu;
   c->pieces = std::move (pieces);
   if (frame == NULL)
@@ -1826,8 +1846,7 @@ rw_pieced_value (struct value *v, struct value *from)
                break;
              }
 
-           struct objfile *objfile = c->per_cu->objfile ();
-           struct gdbarch *objfile_gdbarch = objfile->arch ();
+           gdbarch *objfile_gdbarch = c->per_objfile->objfile->arch ();
            ULONGEST stack_value_size_bits
              = 8 * TYPE_LENGTH (value_type (p->v.value));
 
@@ -1962,7 +1981,8 @@ get_frame_address_in_block_wrapper (void *baton)
 
 static struct value *
 fetch_const_value_from_synthetic_pointer (sect_offset die, LONGEST byte_offset,
-                                         struct dwarf2_per_cu_data *per_cu,
+                                         dwarf2_per_cu_data *per_cu,
+                                         dwarf2_per_objfile *per_objfile,
                                          struct type *type)
 {
   struct value *result = NULL;
@@ -1970,7 +1990,8 @@ fetch_const_value_from_synthetic_pointer (sect_offset die, LONGEST byte_offset,
   LONGEST len;
 
   auto_obstack temp_obstack;
-  bytes = dwarf2_fetch_constant_bytes (die, per_cu, &temp_obstack, &len);
+  bytes = dwarf2_fetch_constant_bytes (die, per_cu, per_objfile,
+                                      &temp_obstack, &len);
 
   if (bytes != NULL)
     {
@@ -1993,18 +2014,20 @@ fetch_const_value_from_synthetic_pointer (sect_offset die, LONGEST byte_offset,
 
 static struct value *
 indirect_synthetic_pointer (sect_offset die, LONGEST byte_offset,
-                           struct dwarf2_per_cu_data *per_cu,
+                           dwarf2_per_cu_data *per_cu,
+                           dwarf2_per_objfile *per_objfile,
                            struct frame_info *frame, struct type *type,
                            bool resolve_abstract_p)
 {
   /* Fetch the location expression of the DIE we're pointing to.  */
   struct dwarf2_locexpr_baton baton
-    = dwarf2_fetch_die_loc_sect_off (die, per_cu,
+    = dwarf2_fetch_die_loc_sect_off (die, per_cu, per_objfile,
                                     get_frame_address_in_block_wrapper, frame,
                                     resolve_abstract_p);
 
   /* Get type of pointed-to DIE.  */
-  struct type *orig_type = dwarf2_fetch_die_type_sect_off (die, per_cu);
+  struct type *orig_type = dwarf2_fetch_die_type_sect_off (die, per_cu,
+                                                          per_objfile);
   if (orig_type == NULL)
     invalid_synthetic_pointer ();
 
@@ -2014,11 +2037,12 @@ indirect_synthetic_pointer (sect_offset die, LONGEST byte_offset,
   if (baton.data != NULL)
     return dwarf2_evaluate_loc_desc_full (orig_type, frame, baton.data,
                                          baton.size, baton.per_cu,
+                                         baton.per_objfile,
                                          TYPE_TARGET_TYPE (type),
                                          byte_offset);
   else
     return fetch_const_value_from_synthetic_pointer (die, byte_offset, per_cu,
-                                                    type);
+                                                    per_objfile, type);
 }
 
 /* An implementation of an lval_funcs method to indirect through a
@@ -2095,7 +2119,7 @@ indirect_pieced_value (struct value *value)
 
   return indirect_synthetic_pointer (piece->v.ptr.die_sect_off,
                                     byte_offset, c->per_cu,
-                                    frame, type);
+                                    c->per_objfile, frame, type);
 }
 
 /* Implementation of the coerce_ref method of lval_funcs for synthetic C++
@@ -2122,7 +2146,7 @@ coerce_pieced_ref (const struct value *value)
       return indirect_synthetic_pointer
        (closure->pieces[0].v.ptr.die_sect_off,
         closure->pieces[0].v.ptr.offset,
-        closure->per_cu, frame, type);
+        closure->per_cu, closure->per_objfile, frame, type);
     }
   else
     {
@@ -2178,12 +2202,12 @@ static const struct lval_funcs pieced_value_funcs = {
 static struct value *
 dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
                               const gdb_byte *data, size_t size,
-                              struct dwarf2_per_cu_data *per_cu,
+                              dwarf2_per_cu_data *per_cu,
+                              dwarf2_per_objfile *per_objfile,
                               struct type *subobj_type,
                               LONGEST subobj_byte_offset)
 {
   struct value *retval;
-  struct objfile *objfile = per_cu->objfile ();
 
   if (subobj_type == NULL)
     {
@@ -2196,7 +2220,6 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
   if (size == 0)
     return allocate_optimized_out_value (subobj_type);
 
-  dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
   dwarf_evaluate_loc_desc ctx (per_objfile);
   ctx.frame = frame;
   ctx.per_cu = per_cu;
@@ -2204,7 +2227,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
 
   scoped_value_mark free_values;
 
-  ctx.gdbarch = objfile->arch ();
+  ctx.gdbarch = per_objfile->objfile->arch ();
   ctx.addr_size = per_cu->addr_size ();
   ctx.ref_addr_size = per_cu->ref_addr_size ();
 
@@ -2245,7 +2268,8 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
       if (bit_size > 8 * TYPE_LENGTH (type))
        invalid_synthetic_pointer ();
 
-      c = allocate_piece_closure (per_cu, std::move (ctx.pieces), frame);
+      c = allocate_piece_closure (per_cu, per_objfile, std::move (ctx.pieces),
+                                 frame);
       /* We must clean up the value chain after creating the piece
         closure but before allocating the result.  */
       free_values.free_to_mark ();
@@ -2326,7 +2350,7 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
            size_t n = TYPE_LENGTH (value_type (value));
            size_t len = TYPE_LENGTH (subobj_type);
            size_t max = TYPE_LENGTH (type);
-           struct gdbarch *objfile_gdbarch = objfile->arch ();
+           gdbarch *objfile_gdbarch = per_objfile->objfile->arch ();
 
            if (subobj_byte_offset + len > max)
              invalid_synthetic_pointer ();
@@ -2389,10 +2413,11 @@ dwarf2_evaluate_loc_desc_full (struct type *type, struct frame_info *frame,
 struct value *
 dwarf2_evaluate_loc_desc (struct type *type, struct frame_info *frame,
                          const gdb_byte *data, size_t size,
-                         struct dwarf2_per_cu_data *per_cu)
+                         dwarf2_per_cu_data *per_cu,
+                         dwarf2_per_objfile *per_objfile)
 {
   return dwarf2_evaluate_loc_desc_full (type, frame, data, size, per_cu,
-                                       NULL, 0);
+                                       per_objfile, NULL, 0);
 }
 
 /* A specialization of dwarf_evaluate_loc_desc that is used by
@@ -2593,7 +2618,8 @@ dwarf2_evaluate_property (const struct dynamic_prop *prop,
        if (data != NULL)
          {
            val = dwarf2_evaluate_loc_desc (baton->property_type, frame, data,
-                                           size, baton->loclist.per_cu);
+                                           size, baton->loclist.per_cu,
+                                           baton->loclist.per_objfile);
            if (!value_optimized_out (val))
              {
                *value = value_as_address (val);
@@ -2750,7 +2776,7 @@ public:
 
   void dwarf_call (cu_offset die_offset) override
   {
-    per_cu_dwarf_call (this, die_offset, per_cu);
+    per_cu_dwarf_call (this, die_offset, per_cu, per_objfile);
   }
 
   /* Helper interface of sect_variable_value for
@@ -2758,7 +2784,7 @@ public:
 
   struct value *dwarf_variable_value (sect_offset sect_off) override
   {
-    return sect_variable_value (this, sect_off, per_cu);
+    return sect_variable_value (this, sect_off, per_cu, per_objfile);
   }
 
   /* DW_OP_entry_value accesses require a caller, therefore a
@@ -2796,18 +2822,18 @@ public:
 
 static enum symbol_needs_kind
 dwarf2_loc_desc_get_symbol_read_needs (const gdb_byte *data, size_t size,
-                                      struct dwarf2_per_cu_data *per_cu)
+                                      dwarf2_per_cu_data *per_cu,
+                                      dwarf2_per_objfile *per_objfile)
 {
   int in_reg;
-  struct objfile *objfile = per_cu->objfile ();
 
   scoped_value_mark free_values;
 
-  symbol_needs_eval_context ctx (get_dwarf2_per_objfile (objfile));
+  symbol_needs_eval_context ctx (per_objfile);
 
   ctx.needs = SYMBOL_NEEDS_NONE;
   ctx.per_cu = per_cu;
-  ctx.gdbarch = objfile->arch ();
+  ctx.gdbarch = per_objfile->objfile->arch ();
   ctx.addr_size = per_cu->addr_size ();
   ctx.ref_addr_size = per_cu->ref_addr_size ();
 
@@ -3587,7 +3613,7 @@ dwarf2_compile_expr_to_ax (struct agent_expr *expr, struct axs_value *loc,
            op_ptr += size;
 
            cu_offset cuoffset = (cu_offset) uoffset;
-           block = dwarf2_fetch_die_loc_cu_off (cuoffset, per_cu,
+           block = dwarf2_fetch_die_loc_cu_off (cuoffset, per_cu, per_objfile,
                                                 get_ax_pc, expr);
 
            /* DW_OP_call_ref is currently not supported.  */
@@ -3631,7 +3657,8 @@ locexpr_read_variable (struct symbol *symbol, struct frame_info *frame)
   struct value *val;
 
   val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame, dlbaton->data,
-                                 dlbaton->size, dlbaton->per_cu);
+                                 dlbaton->size, dlbaton->per_cu,
+                                 dlbaton->per_objfile);
 
   return val;
 }
@@ -3660,7 +3687,8 @@ locexpr_get_symbol_read_needs (struct symbol *symbol)
     = (struct dwarf2_locexpr_baton *) SYMBOL_LOCATION_BATON (symbol);
 
   return dwarf2_loc_desc_get_symbol_read_needs (dlbaton->data, dlbaton->size,
-                                               dlbaton->per_cu);
+                                               dlbaton->per_cu,
+                                               dlbaton->per_objfile);
 }
 
 /* Return true if DATA points to the end of a piece.  END is one past
@@ -4140,7 +4168,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
 
            data = safe_read_uleb128 (data, end, &ul);
            cu_offset offset = (cu_offset) ul;
-           type = dwarf2_get_die_type (offset, per_cu);
+           type = dwarf2_get_die_type (offset, per_cu, per_objfile);
            fprintf_filtered (stream, "<");
            type_print (type, "", stream, -1);
            fprintf_filtered (stream, " [0x%s]> %d",
@@ -4156,7 +4184,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
 
            data = safe_read_uleb128 (data, end, &ul);
            cu_offset type_die = (cu_offset) ul;
-           type = dwarf2_get_die_type (type_die, per_cu);
+           type = dwarf2_get_die_type (type_die, per_cu, per_objfile);
            fprintf_filtered (stream, "<");
            type_print (type, "", stream, -1);
            fprintf_filtered (stream, " [0x%s]>",
@@ -4180,7 +4208,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
            data = safe_read_uleb128 (data, end, &ul);
            cu_offset type_die = (cu_offset) ul;
 
-           type = dwarf2_get_die_type (type_die, per_cu);
+           type = dwarf2_get_die_type (type_die, per_cu, per_objfile);
            fprintf_filtered (stream, "<");
            type_print (type, "", stream, -1);
            fprintf_filtered (stream, " [0x%s]> [$%s]",
@@ -4203,7 +4231,7 @@ disassemble_dwarf_expression (struct ui_file *stream,
              {
                struct type *type;
 
-               type = dwarf2_get_die_type (type_die, per_cu);
+               type = dwarf2_get_die_type (type_die, per_cu, per_objfile);
                fprintf_filtered (stream, "<");
                type_print (type, "", stream, -1);
                fprintf_filtered (stream, " [0x%s]>",
@@ -4450,7 +4478,7 @@ loclist_read_variable (struct symbol *symbol, struct frame_info *frame)
 
   data = dwarf2_find_location_expression (dlbaton, &size, pc);
   val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame, data, size,
-                                 dlbaton->per_cu);
+                                 dlbaton->per_cu, dlbaton->per_objfile);
 
   return val;
 }
This page took 0.031996 seconds and 4 git commands to generate.