diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2007-04-11 16:04:23 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2007-04-11 16:04:23 +0000 |
commit | d77b680888b9cfdc3a4822dbebb1d2b07a92060f (patch) | |
tree | 6e38e9df50bba915daad314ed8bd74d0762d2f23 /gdb | |
parent | 0b49cb802f58299602d2201e22d58f93a50474c7 (diff) | |
download | ppe42-binutils-d77b680888b9cfdc3a4822dbebb1d2b07a92060f.tar.gz ppe42-binutils-d77b680888b9cfdc3a4822dbebb1d2b07a92060f.zip |
* gdbtypes.h (TYPE_FLAG_STUB_SUPPORTED, TYPE_STUB_SUPPORTED): New
macros.
(TYPE_IS_OPAQUE): Empty vs. opaque structures are now
distinct on the TYPE_STUB_SUPPORTED debug targets.
* dwarf2read.c (read_structure_type): Set TYPE_FLAG_STUB_SUPPORTED.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 1 | ||||
-rw-r--r-- | gdb/gdbtypes.h | 11 |
3 files changed, 19 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0e7168fb75..eb7d253afa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2007-04-11 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdbtypes.h (TYPE_FLAG_STUB_SUPPORTED, TYPE_STUB_SUPPORTED): New + macros. + (TYPE_IS_OPAQUE): Empty vs. opaque structures are now + distinct on the TYPE_STUB_SUPPORTED debug targets. + * dwarf2read.c (read_structure_type): Set TYPE_FLAG_STUB_SUPPORTED. + 2007-04-11 Joel Brobecker <brobecker@adacore.com> * sparc-tdep.c (X_RS2): New macro. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 0fb35006e0..d0a1bb19d8 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3879,6 +3879,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) TYPE_LENGTH (type) = 0; } + TYPE_FLAGS (type) |= TYPE_FLAG_STUB_SUPPORTED; if (die_is_declaration (die, cu)) TYPE_FLAGS (type) |= TYPE_FLAG_STUB; diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 8cbd26ce49..39ed5ccd15 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -319,6 +319,14 @@ enum type_code #define TYPE_FLAG_FIXED_INSTANCE (1 << 15) +/* This debug target supports TYPE_STUB(t). In the unsupported case we have to + rely on NFIELDS to be zero etc., see TYPE_IS_OPAQUE (). + TYPE_STUB(t) with !TYPE_STUB_SUPPORTED(t) may exist if we only guessed + the TYPE_STUB(t) value (see dwarfread.c). */ + +#define TYPE_FLAG_STUB_SUPPORTED (1 << 16) +#define TYPE_STUB_SUPPORTED(t) (TYPE_FLAGS (t) & TYPE_FLAG_STUB_SUPPORTED) + /* Array bound type. */ enum array_bound_type { @@ -969,7 +977,8 @@ extern void allocate_cplus_struct_type (struct type *); #define TYPE_IS_OPAQUE(thistype) (((TYPE_CODE (thistype) == TYPE_CODE_STRUCT) || \ (TYPE_CODE (thistype) == TYPE_CODE_UNION)) && \ (TYPE_NFIELDS (thistype) == 0) && \ - (TYPE_CPLUS_SPECIFIC (thistype) && (TYPE_NFN_FIELDS (thistype) == 0))) + (TYPE_CPLUS_SPECIFIC (thistype) && (TYPE_NFN_FIELDS (thistype) == 0)) && \ + (TYPE_STUB (thistype) || !TYPE_STUB_SUPPORTED (thistype))) struct builtin_type { |