[Midnightbsd-cvs] src [7786] trunk/contrib/gdb/gdb/dwarf2read.c: handle DW_TAG_unspecified_type
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Mon Sep 5 12:32:08 EDT 2016
Revision: 7786
http://svnweb.midnightbsd.org/src/?rev=7786
Author: laffer1
Date: 2016-09-05 12:32:04 -0400 (Mon, 05 Sep 2016)
Log Message:
-----------
handle DW_TAG_unspecified_type
Obtained from: Apple
Modified Paths:
--------------
trunk/contrib/gdb/gdb/dwarf2read.c
Modified: trunk/contrib/gdb/gdb/dwarf2read.c
===================================================================
--- trunk/contrib/gdb/gdb/dwarf2read.c 2016-09-05 16:30:02 UTC (rev 7785)
+++ trunk/contrib/gdb/gdb/dwarf2read.c 2016-09-05 16:32:04 UTC (rev 7786)
@@ -825,6 +825,8 @@
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 @@
}
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;
@@ -6091,6 +6114,9 @@
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;
More information about the Midnightbsd-cvs
mailing list