Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2013 18:25:36 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r256853 - stable/9/contrib/gdb/gdb
Message-ID:  <201310211825.r9LIPavK067873@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Oct 21 18:25:36 2013
New Revision: 256853
URL: http://svnweb.freebsd.org/changeset/base/256853

Log:
  MFC r251667: 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

Modified:
  stable/9/contrib/gdb/gdb/dwarf2read.c
Directory Properties:
  stable/9/contrib/gdb/   (props changed)

Modified: stable/9/contrib/gdb/gdb/dwarf2read.c
==============================================================================
--- stable/9/contrib/gdb/gdb/dwarf2read.c	Mon Oct 21 18:23:16 2013	(r256852)
+++ stable/9/contrib/gdb/gdb/dwarf2read.c	Mon Oct 21 18:25:36 2013	(r256853)
@@ -825,6 +825,8 @@ static void read_array_type (struct die_
 
 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
 }
 
 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, str
     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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310211825.r9LIPavK067873>