diff options
author | Tom Tromey <tromey@redhat.com> | 2010-02-02 16:47:14 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-02-02 16:47:14 +0000 |
commit | 0cc2414c91dfd4d34c43b4e20e3307ab94629333 (patch) | |
tree | 4386662a81d909a5ad75cf54a7c98345e0dd0c63 /gdb/dwarf2read.c | |
parent | edf3d5f3f8c5adff55934e57da9cd8c874dc2a55 (diff) | |
download | binutils-0cc2414c91dfd4d34c43b4e20e3307ab94629333.zip binutils-0cc2414c91dfd4d34c43b4e20e3307ab94629333.tar.gz binutils-0cc2414c91dfd4d34c43b4e20e3307ab94629333.tar.bz2 |
gdb
* m2-typeprint.c (m2_record_fields): Don't use
TYPE_DECLARED_TYPE.
* gdbtypes.h (TYPE_DECLARED_CLASS): New macro.
(struct main_type) <flag_declared_class>: New field.
(struct cplus_struct_type) <declared_type>: Remove.
<ntemplate_args>: Move earlier.
(DECLARED_TYPE_CLASS, DECLARED_TYPE_UNION, DECLARED_TYPE_STRUCT)
(DECLARED_TYPE_TEMPLATE): Remove.
(TYPE_DECLARED_TYPE): Remove.
* gdbtypes.c (lookup_union): Don't use TYPE_DECLARED_TYPE.
* dwarf2read.c (read_structure_type): Set TYPE_DECLARED_CLASS.
* c-typeprint.c (c_type_print_base): Use TYPE_DECLARED_CLASS, not
TYPE_DECLARED_TYPE.
gdb/testsuite
* gdb.dwarf2/member-ptr-forwardref.exp: Update expected result for
type-printing change.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 2f671ca..86bfecb 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -5007,11 +5007,12 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) } else { - /* FIXME: TYPE_CODE_CLASS is currently defined to TYPE_CODE_STRUCT - in gdbtypes.h. */ TYPE_CODE (type) = TYPE_CODE_CLASS; } + if (cu->language == language_cplus && die->tag == DW_TAG_class_type) + TYPE_DECLARED_CLASS (type) = 1; + attr = dwarf2_attr (die, DW_AT_byte_size, cu); if (attr) { |