Compute the function length instead of hard coding it
[deliverable/binutils-gdb.git] / gdb / ada-varobj.c
index aab7335eae39c23111016959b00ce523f08d68cf..3da6018920ddf11d33f664b2340522011671e037 100644 (file)
@@ -219,6 +219,15 @@ ada_varobj_adjust_for_child_access (struct value **value,
       && !ada_is_array_descriptor_type (TYPE_TARGET_TYPE (*type))
       && !ada_is_constrained_packed_array_type (TYPE_TARGET_TYPE (*type)))
     ada_varobj_ind (*value, *type, value, type);
+
+  /* If this is a tagged type, we need to transform it a bit in order
+     to be able to fetch its full view.  As always with tagged types,
+     we can only do that if we have a value.  */
+  if (*value != NULL && ada_is_tagged_type (*type, 1))
+    {
+      *value = ada_tag_value_at_base_address (*value);
+      *type = value_type (*value);
+    }
 }
 
 /* Assuming that the (PARENT_VALUE, PARENT_TYPE) pair is an array
This page took 0.024501 seconds and 4 git commands to generate.