summaryrefslogtreecommitdiffstats
path: root/contrib/gdb
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2013-06-12 20:11:49 +0000
committeremaste <emaste@FreeBSD.org>2013-06-12 20:11:49 +0000
commit193f745cdd9132c85c5a375c344a26f4013baa1f (patch)
tree9b1939ef2c6e97aa0472231d2721caaed9c0733f /contrib/gdb
parentd224714001f065382c6845d73a013ee332e42a9b (diff)
downloadFreeBSD-src-193f745cdd9132c85c5a375c344a26f4013baa1f.zip
FreeBSD-src-193f745cdd9132c85c5a375c344a26f4013baa1f.tar.gz
Handle DW_TAG_unspecified_type
2011-11-14 Jim Ingham <jingham@apple.com> * dwarf2read.c (read_type_die): Handle DW_TAG_unspecified_type. (read_tag_unspecified_type): New function, add a type for the DW_TAG_unspecified_type die. Obtained from: Apple, gdb-1752
Diffstat (limited to 'contrib/gdb')
-rw-r--r--contrib/gdb/gdb/dwarf2read.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/contrib/gdb/gdb/dwarf2read.c b/contrib/gdb/gdb/dwarf2read.c
index 2e2737d..72f5dde 100644
--- a/contrib/gdb/gdb/dwarf2read.c
+++ b/contrib/gdb/gdb/dwarf2read.c
@@ -825,6 +825,8 @@ static void read_array_type (struct die_info *, struct dwarf2_cu *);
static void read_tag_pointer_type (struct die_info *, struct dwarf2_cu *);
+static void read_tag_unspecified_type (struct die_info *, struct dwarf2_cu *);
+
static void read_tag_ptr_to_member_type (struct die_info *,
struct dwarf2_cu *);
@@ -3722,6 +3724,27 @@ read_tag_reference_type (struct die_info *die, struct dwarf2_cu *cu)
}
static void
+read_tag_unspecified_type (struct die_info *die, struct dwarf2_cu *cu)
+{
+ struct objfile *objfile = cu->objfile;
+ struct type *type;
+ struct attribute *attr;
+
+ if (die->type)
+ {
+ return;
+ }
+
+ type = alloc_type (objfile);
+ TYPE_LENGTH (type) = 0;
+ attr = dwarf2_attr (die, DW_AT_name, cu);
+ if (attr && DW_STRING (attr))
+ TYPE_NAME (type) = DW_STRING (attr);
+
+ die->type = type;
+}
+
+static void
read_tag_const_type (struct die_info *die, struct dwarf2_cu *cu)
{
struct type *base_type;
@@ -6094,6 +6117,9 @@ read_type_die (struct die_info *die, struct dwarf2_cu *cu)
case DW_TAG_pointer_type:
read_tag_pointer_type (die, cu);
break;
+ case DW_TAG_unspecified_type:
+ read_tag_unspecified_type (die, cu);
+ break;
case DW_TAG_ptr_to_member_type:
read_tag_ptr_to_member_type (die, cu);
break;
OpenPOWER on IntegriCloud