aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-05-08 11:26:44 -0600
committerTom Tromey <tromey@redhat.com>2014-06-04 14:28:22 -0600
commit012370f6818657a816df1463ee71ca4e4ee40b33 (patch)
tree86113cdbeeca68560686b21b4c8af168d473dc3f /gdb/value.h
parent92e2a17f9b145d35b4a9a2273612d323ccdc9cac (diff)
downloadbinutils-012370f6818657a816df1463ee71ca4e4ee40b33.zip
binutils-012370f6818657a816df1463ee71ca4e4ee40b33.tar.gz
binutils-012370f6818657a816df1463ee71ca4e4ee40b33.tar.bz2
handle VLA in a struct or union
It is valid in GNU C to have a VLA in a struct or union type, but gdb did not handle this. This patch adds support for these cases in the obvious way. Built and regtested on x86-64 Fedora 20. New tests included. 2014-06-04 Tom Tromey <tromey@redhat.com> * ada-lang.c (ada_template_to_fixed_record_type_1): Use value_from_contents_and_address_unresolved. (ada_template_to_fixed_record_type_1): Likewise. (ada_which_variant_applies): Likewise. * value.h (value_from_contents_and_address_unresolved): Declare. * value.c (value_from_contents_and_address_unresolved): New function. * gdbtypes.c (is_dynamic_type, resolve_dynamic_type) <TYPE_CODE_STRUCT, TYPE_CODE_UNION>: New cases. (resolve_dynamic_struct, resolve_dynamic_union): New functions. 2014-06-04 Tom Tromey <tromey@redhat.com> * gdb.base/vla-datatypes.exp: Add tests for VLA-in-structure and VLA-in-union. * gdb.base/vla-datatypes.c (vla_factory): Add vla_struct, inner_vla_struct, vla_union types. Initialize objects of those types and compute their sizes.
Diffstat (limited to 'gdb/value.h')
-rw-r--r--gdb/value.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/value.h b/gdb/value.h
index 65fd203..c2e9faf 100644
--- a/gdb/value.h
+++ b/gdb/value.h
@@ -575,6 +575,8 @@ extern struct value *value_from_history_ref (char *, char **);
extern struct value *value_at (struct type *type, CORE_ADDR addr);
extern struct value *value_at_lazy (struct type *type, CORE_ADDR addr);
+extern struct value *value_from_contents_and_address_unresolved
+ (struct type *, const gdb_byte *, CORE_ADDR);
extern struct value *value_from_contents_and_address (struct type *,
const gdb_byte *,
CORE_ADDR);