Prefer existing data when evaluating DWARF expression
[deliverable/binutils-gdb.git] / gdb / value.c
index 5ae0b32f4fc2537e59db16d5d7c8710a165ef325..7ea39af55517025e3b0a56221e51acaef6c52770 100644 (file)
@@ -3477,7 +3477,10 @@ value_from_contents_and_address (struct type *type,
                                 const gdb_byte *valaddr,
                                 CORE_ADDR address)
 {
-  struct type *resolved_type = resolve_dynamic_type (type, valaddr, address);
+  gdb::array_view<const gdb_byte> view;
+  if (valaddr != nullptr)
+    view = gdb::make_array_view (valaddr, TYPE_LENGTH (type));
+  struct type *resolved_type = resolve_dynamic_type (type, view, address);
   struct type *resolved_type_no_typedef = check_typedef (resolved_type);
   struct value *v;
 
This page took 0.042882 seconds and 4 git commands to generate.