From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121349 invoked by alias); 13 May 2015 20:58:11 -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 121340 invoked by uid 89); 13 May 2015 20:58:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 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-f171.google.com Received: from mail-ob0-f171.google.com (HELO mail-ob0-f171.google.com) (209.85.214.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 13 May 2015 20:58:10 +0000 Received: by obblk2 with SMTP id lk2so39412088obb.0 for ; Wed, 13 May 2015 13:58: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=IbqhKuE025qkkytmHoMXtvKHu+Tc/ZSYTPmnlK15Yzk=; b=jl9miiP+99GP/3R5tz+eUHNr3urajHhMZcsQLOAxbpimeKsHmxhRyg+Avvgi1s0FsD efN0bpHnBligXOZ8ad6Q95b0DJZCexQcr/pu4PmDbn6lAEfl/b9ABcll0d2KbBCvOtDi PxUJRP1uUtP+CE43oXaYh99s/mqDh3O4JqbxHuT1BitqgdnL34HtfHa5leLsKoHf0ieH 6DGjuhSR+/u8pdFtV2/+lYQ/EmTiLVGEHRQKC/LIgnfdcy1+Cv60XJVP40ge2BcVGsp+ 9A3tQkpfaih51qPCPQY6WhAbGRn9d9y0DPQfMOxiJ628s/qpDkUAIQGUiRiQK7LuuISK EpMA== X-Gm-Message-State: ALoCoQkVbuvf1sA5jp6UT9PC63yjsXRoPAZ9cG6GGXxIoJyMG9i3JlfHzxd0m9/WhsyPZJktp3S8 MIME-Version: 1.0 X-Received: by 10.202.72.213 with SMTP id v204mr654040oia.116.1431550688157; Wed, 13 May 2015 13:58:08 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Wed, 13 May 2015 13:58:08 -0700 (PDT) In-Reply-To: References: <1429802693-4582-1-git-send-email-martin.galvan@tallertechnologies.com> Date: Wed, 13 May 2015 20:58: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-05/txt/msg00344.txt.bz2 On Thu, Apr 23, 2015 at 8:52 AM, Doug Evans wrote: > 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 w= hose tag was DW_TAG_inlined_subroutine. This meant that dwarf2_physname wou= ld simply return the DIE's name attribute (which in our case would be "meth= od"). Therefore, when new_symbol_full called SYMBOL_SET_NAMES, the linkagen= ame argument wasn't the demangled name as it should have. >> >> This patch adds a case which would return 1 for DW_TAG_inlined_subroutin= e 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, = though, 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 = dwarf2_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. Committed. I forgot the extra step of setting the author correctly, but it's just one line so I'm leaving it.