From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6359 invoked by alias); 1 Jul 2010 17:09:06 -0000 Received: (qmail 6349 invoked by uid 22791); 1 Jul 2010 17:09:04 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Jul 2010 17:08:58 +0000 Received: (qmail 3673 invoked from network); 1 Jul 2010 17:08:56 -0000 Received: from unknown (HELO orlando.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Jul 2010 17:08:56 -0000 From: Pedro Alves To: "Pierre Muller" Subject: Re: [RFA]dwarf reader: Avoid complaint on const type Date: Thu, 01 Jul 2010 17:09:00 -0000 User-Agent: KMail/1.13.2 (Linux/2.6.31-10-rt; KDE/4.4.2; x86_64; ; ) Cc: "'Doug Evans'" , gdb-patches@sourceware.org References: <41597.7287375883$1274454923@news.gmane.org> <002401cb178c$57428a70$05c79f50$@muller@ics-cnrs.unistra.fr> In-Reply-To: <002401cb178c$57428a70$05c79f50$@muller@ics-cnrs.unistra.fr> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201007011808.55025.pedro@codesourcery.com> X-IsSubscribed: yes 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-07/txt/msg00021.txt.bz2 I hope you're not waiting for me to review this. (Honestly, in cases like these, I prefer to simply revert the original broken patch, and then calmly build a new correct patch from scratch. It becomes much easier to see and understand what was being addressed originaly instead of having to look at the code in 3D. I've noticed that people here have revert fobia though ;-) ). On Tuesday 29 June 2010 14:09:41, Pierre Muller wrote: > 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); > > -- Pedro Alves