From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26926 invoked by alias); 29 Jun 2010 13:09:53 -0000 Received: (qmail 26916 invoked by uid 22791); 29 Jun 2010 13:09:53 -0000 X-SWARE-Spam-Status: No, hits=3.4 required=5.0 tests=AWL,BAYES_20,KAM_STOCKGEN,MSGID_MULTIPLE_AT,RCVD_IN_JMF_BL,RCVD_IN_PSBL X-Spam-Check-By: sourceware.org Received: from mailhost.u-strasbg.fr (HELO mailhost.u-strasbg.fr) (130.79.200.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jun 2010 13:09:44 +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 o5TD9U77093995 ; Tue, 29 Jun 2010 15:09:30 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from mailserver.u-strasbg.fr (ms4.u-strasbg.fr [IPv6:2001:660:2402:d::13]) by baal.u-strasbg.fr (8.14.0/jtpda-5.5pre1) with ESMTP id o5TD9T8E066969 ; Tue, 29 Jun 2010 15:09:29 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) Received: from d620muller (lec67-4-82-230-53-140.fbx.proxad.net [82.230.53.140]) (user=mullerp mech=LOGIN) by mailserver.u-strasbg.fr (8.14.4/jtpda-5.5pre1) with ESMTP id o5TD9RIX040172 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) ; Tue, 29 Jun 2010 15:09:28 +0200 (CEST) (envelope-from pierre.muller@ics-cnrs.unistra.fr) From: "Pierre Muller" To: "'Doug Evans'" Cc: "'Pedro Alves'" , References: <41597.7287375883$1274454923@news.gmane.org> <201006161708.41089.pedro@codesourcery.com> <3752333521215815628@unknownmsgid> In-Reply-To: Subject: RE: [RFA]dwarf reader: Avoid complaint on const type Date: Tue, 29 Jun 2010 13:09:00 -0000 Message-ID: <002401cb178c$57428a70$05c79f50$@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-06/txt/msg00675.txt.bz2 I agree with Doug's analysis that new_symbol should never be called for those dwarf tags. The most logical seems to just revert the addition of of the two tags, which would lead to a complaint if new_symbol would be called for those tags, as it did before my original patch. As Doug explained, this should not happen anymore as new_symbol is only called from process_die and the first part of the patch removes this call for DW_TAG_const_type and DW_TAG_volatile_type. Tested on x86_64 linux machine from GCC compiler farm, nothing related to the patch seemed to appear. (sigaltstack.exp showed failures but I don't think this is related). Pierre 2010-06-29 Pierre Muller Doug Evans * dwarf2read.c (process_die): Only call read_type_die function for const and volatile modifiers. (new_symbol): Revert change adding a new type for DW_TAG_const_type or DW_TAG_volatile_type tag if it has a name attribute. Index: src/gdb/dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.406 diff -u -p -r1.406 dwarf2read.c --- src/gdb/dwarf2read.c 28 Jun 2010 22:03:31 -0000 1.406 +++ src/gdb/dwarf2read.c 29 Jun 2010 12:31:55 -0000 @@ -3220,12 +3220,15 @@ 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); break; + /* Type modifiers should be accepted without creating a new type name. */ + case DW_TAG_const_type: + case DW_TAG_volatile_type: + read_type_die (die, cu); + break; case DW_TAG_common_block: read_common_block (die, cu); break; @@ -8987,9 +8990,7 @@ new_symbol (struct die_info *die, struct add_symbol_to_list (sym, cu->list_in_scope); break; case DW_TAG_base_type: - case DW_TAG_subrange_type: - case DW_TAG_const_type: - case DW_TAG_volatile_type: + case DW_TAG_subrange_type: SYMBOL_CLASS (sym) = LOC_TYPEDEF; SYMBOL_DOMAIN (sym) = VAR_DOMAIN; add_symbol_to_list (sym, cu->list_in_scope);