]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/ada-lang.c
Resolve dynamic type in ada_value_struct_elt
[thirdparty/binutils-gdb.git] / gdb / ada-lang.c
index bfb46a538b96987187797eb5aee7175e9b06167c..7613e190108f1f9a38e5a7e4b56ea26cafdfaf1f 100644 (file)
@@ -4396,6 +4396,10 @@ ada_value_struct_elt (struct value *arg, const char *name, int no_err)
       t1 = ada_to_fixed_type (ada_get_base_type (t1), NULL,
                              address, NULL, check_tag);
 
+      /* Resolve the dynamic type as well.  */
+      arg = value_from_contents_and_address (t1, nullptr, address);
+      t1 = value_type (arg);
+
       if (find_struct_field (name, t1, 0,
                             &field_type, &byte_offset, &bit_offset,
                             &bit_size, NULL))