From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6979 invoked by alias); 21 May 2010 15:15:15 -0000 Received: (qmail 6926 invoked by uid 22791); 21 May 2010 15:15:14 -0000 X-SWARE-Spam-Status: No, hits=-0.7 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,MSGID_MULTIPLE_AT X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.153) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 May 2010 15:15:06 +0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o4LFF3rE013412 for ; Fri, 21 May 2010 17:15:03 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms2.u-strasbg.fr [IPv6:2001:660:2402:d::11]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o4LFF3Zx070299 for ; Fri, 21 May 2010 17:15:03 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (gw-ics.u-strasbg.fr [130.79.210.225]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.3/jtpda-5.5pre1) with ESMTP id o4LFF3TI092495 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Fri, 21 May 2010 17:15:03 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: Subject: [RFA]dwarf reader: Avoid complaint on const type Date: Fri, 21 May 2010 15:31:00 -0000 Message-ID: <000a01caf8f8$6705ed60$3511c820$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-05/txt/msg00491.txt.bz2 GDB CVS compiled for Linux arm gave several dwarf complaints when debugging itself that I tried to fix. Here is a first fix: It seem that some symbol directly come as DW_TAG_const_type, I believe it was due to typedef const struct reloc_howto_struct reloc_howto_type; from bfd-in.h (or bfd-in2.h), but I did not recheck this carefully. The patch below fixes that complaint. Tested on compiler farm machine gcc16, no regression found. Is this correct? Maybe there are other position where DW_TAG_const_type and DW_TAG_volatile_type should be added... Pierre Muller Pascal language support maintainer for GDB 2010-05-21 Pierre Muller * dwarf2read.c (process_die): Also allow DW_TAG_const_type and DW_TAG_volatile_type. (new_symbol): Likewise. Index: src/gdb/dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.386 diff -u -p -r1.386 dwarf2read.c --- src/gdb/dwarf2read.c 17 May 2010 15:55:01 -0000 1.386 +++ src/gdb/dwarf2read.c 21 May 2010 14:40:59 -0000 @@ -3194,6 +3194,8 @@ process_die (struct die_info *die, struc case DW_TAG_base_type: case DW_TAG_subrange_type: case DW_TAG_typedef: + case DW_TAG_const_type: + case DW_TAG_volatile_type: /* Add a typedef symbol for the type definition, if it has a DW_AT_name. */ new_symbol (die, read_type_die (die, cu), cu); @@ -8742,6 +8744,8 @@ new_symbol (struct die_info *die, struct break; case DW_TAG_base_type: case DW_TAG_subrange_type: + case DW_TAG_const_type: + case DW_TAG_volatile_type: SYMBOL_CLASS (sym) = LOC_TYPEDEF; SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, cu->list_in_scope);