From owner-svn-src-all@FreeBSD.ORG Wed Jun 12 20:11:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C438188A; Wed, 12 Jun 2013 20:11:49 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B6D141EF0; Wed, 12 Jun 2013 20:11:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5CKBnSv036026; Wed, 12 Jun 2013 20:11:49 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5CKBnWd036025; Wed, 12 Jun 2013 20:11:49 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201306122011.r5CKBnWd036025@svn.freebsd.org> From: Ed Maste Date: Wed, 12 Jun 2013 20:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251667 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jun 2013 20:11:49 -0000 Author: emaste Date: Wed Jun 12 20:11:49 2013 New Revision: 251667 URL: http://svnweb.freebsd.org/changeset/base/251667 Log: Handle DW_TAG_unspecified_type 2011-11-14 Jim Ingham * 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: head/contrib/gdb/gdb/dwarf2read.c Modified: head/contrib/gdb/gdb/dwarf2read.c ============================================================================== --- head/contrib/gdb/gdb/dwarf2read.c Wed Jun 12 20:08:30 2013 (r251666) +++ head/contrib/gdb/gdb/dwarf2read.c Wed Jun 12 20:11:49 2013 (r251667) @@ -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;