From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 71762 invoked by alias); 23 Apr 2015 15:52:12 -0000 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 Received: (qmail 71747 invoked by uid 89); 23 Apr 2015 15:52:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_STOCKGEN,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mail-ob0-f176.google.com Received: from mail-ob0-f176.google.com (HELO mail-ob0-f176.google.com) (209.85.214.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 23 Apr 2015 15:52:10 +0000 Received: by obfe9 with SMTP id e9so16780242obf.1 for ; Thu, 23 Apr 2015 08:52:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=WyzPd7jDec2XY175HSpNk9OkgyxQDHcffsb8/fc/CCE=; b=CAgHeV/C6Zjwt1IiCWJBqdmLNjHrqFgm1oinHch07Z/+lXZ9f+LYCUrkhD9RPW+aNw a09KuX0riP5amz9y5wx0/DEmgSi8kedHrsS//Vea1fKOkt74+Hd3pYQoPElTLYP/oTUE WtX1szU6CJyNNrB66RjHFnkLxI7Cg2n+ErLz5Cu8gpHAqGDHJC28Wv5nWJaO4u2mKN5z 9ZO6BYk0f+A2ka1qcIuvXWCWhpPaK+lBvhb7RuQzNMY3j2M27LeXIBKYtoUtX9TkOMdR V+3WNHwZksAcYArTGSxiaFEc63c1308okRKS6cEZTi/IxB/TZ0F50HqXunfoCjpIA5XG tjmg== X-Gm-Message-State: ALoCoQkT1UBTkh8mLc90lf0ZvmdOdlQTJS5SwJdIVQW/fZ8MVakAI+dCTuXH15IZ7vd6EucEvUKN MIME-Version: 1.0 X-Received: by 10.60.137.201 with SMTP id qk9mr3120581oeb.15.1429804328500; Thu, 23 Apr 2015 08:52:08 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Thu, 23 Apr 2015 08:52:08 -0700 (PDT) In-Reply-To: <1429802693-4582-1-git-send-email-martin.galvan@tallertechnologies.com> References: <1429802693-4582-1-git-send-email-martin.galvan@tallertechnologies.com> Date: Thu, 23 Apr 2015 15:52:00 -0000 Message-ID: Subject: Re: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) From: Doug Evans To: Martin Galvan Cc: gdb-patches Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00893.txt.bz2 On Thu, Apr 23, 2015 at 8:24 AM, Martin Galvan wrote: > This bug was being caused by die_needs_namespace returning 0 for a DIE wh= ose tag was DW_TAG_inlined_subroutine. This meant that dwarf2_physname woul= d simply return the DIE's name attribute (which in our case would be "metho= d"). Therefore, when new_symbol_full called SYMBOL_SET_NAMES, the linkagena= me argument wasn't the demangled name as it should have. > > This patch adds a case which would return 1 for DW_TAG_inlined_subroutine= in die_needs_namespace. It's tested both for classes and namespaces. > > I have a company-wide copyright assignment. I don't have commit access, t= hough, so it would be great if anyone could commit this for me. > > gdb/ > 2015-04-23 Martin Galvan > > * dwarf2read.c (die_needs_namespace): Return 1 for > DW_TAG_inlined_subroutine. > > --- > gdb/dwarf2read.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c > index f6b0c01..2bf3513 100644 > --- a/gdb/dwarf2read.c > +++ b/gdb/dwarf2read.c > @@ -8357,6 +8357,7 @@ die_needs_namespace (struct die_info *die, struct d= warf2_cu *cu) > case DW_TAG_enumeration_type: > case DW_TAG_enumerator: > case DW_TAG_subprogram: > + case DW_TAG_inlined_subroutine: > case DW_TAG_member: > case DW_TAG_imported_declaration: > return 1; LGTM. I'll check it in.