diff options
author | Julian Brown <julian@codesourcery.com> | 2006-06-14 15:06:35 +0000 |
---|---|---|
committer | Julian Brown <julian@codesourcery.com> | 2006-06-14 15:06:35 +0000 |
commit | 81a17f794b5eaadb8eb9ab97cd89cd2982a62191 (patch) | |
tree | fdf06c8e6d4dfd327245f7e64a5f19039fc8ecc1 /gdb/dwarf2read.c | |
parent | adad22db6d919ca1823e63c57532d8b747b2d9ef (diff) | |
download | gdb-81a17f794b5eaadb8eb9ab97cd89cd2982a62191.zip gdb-81a17f794b5eaadb8eb9ab97cd89cd2982a62191.tar.gz gdb-81a17f794b5eaadb8eb9ab97cd89cd2982a62191.tar.bz2 |
* dwarf2read.c (read_unspecified_type): New function.
(read_type_die): Handle DW_TAG_unspecified_type.
(Committed by Julian Brown.)
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r-- | gdb/dwarf2read.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 057df7d..bcd796f 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -4859,6 +4859,23 @@ read_subrange_type (struct die_info *die, struct dwarf2_cu *cu) set_die_type (die, range_type, cu); } +static void +read_unspecified_type (struct die_info *die, struct dwarf2_cu *cu) +{ + struct type *type; + struct attribute *attr; + + if (die->type) + return; + + /* For now, we only support the C meaning of an unspecified type: void. */ + + attr = dwarf2_attr (die, DW_AT_name, cu); + type = init_type (TYPE_CODE_VOID, 0, 0, attr ? DW_STRING (attr) : "", + cu->objfile); + + set_die_type (die, type, cu); +} /* Read a whole compilation unit into a linked list of dies. */ @@ -7345,6 +7362,9 @@ read_type_die (struct die_info *die, struct dwarf2_cu *cu) case DW_TAG_base_type: read_base_type (die, cu); break; + case DW_TAG_unspecified_type: + read_unspecified_type (die, cu); + break; default: complaint (&symfile_complaints, _("unexpected tag in read_type_die: '%s'"), dwarf_tag_name (die->tag)); |