From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37477 invoked by alias); 13 May 2015 21:10:54 -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 37464 invoked by uid 89); 13 May 2015 21:10:53 -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-oi0-f45.google.com Received: from mail-oi0-f45.google.com (HELO mail-oi0-f45.google.com) (209.85.218.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 13 May 2015 21:10:52 +0000 Received: by oift201 with SMTP id t201so41541667oif.3 for ; Wed, 13 May 2015 14:10:50 -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=aoScAoT6ZNrSJH+9YaryFNXx2+nTQ6sif8bFA8dloe0=; b=HWBfLuYP1+a1eAQlLqkpplO1hQSewcoIa/EoHzCkjsM0PrmXleunPrgC0F5gmUBdY7 cPRG0YEj9gQFvVRAAG32Rtzd2pmKcG6EGQ02yWzyRJbhtHCRsaGI5GrJ1u/1pMtgRmSm Sf04USFsGpA7cFGPH23sE1ScdMhKl+qqp7BVGrHo9n1VNYoqhsoV7xDFsHn4xyST520a KRaJcXJDFYMvPhhFwa4QtRRySkMdNAKWJyfVHSrQGyVa2Ds6YVx8bvK2dTlcrXANyGy4 7SoTltNF0WQ+Wx/Afkx9vgCWdIio52xr3eug3/wXZoZ1USkDIpAJuy0tzE/pys4OvNLN XGHg== X-Gm-Message-State: ALoCoQn9fZcmxaOTdfgeKK1RnjqT/Q2sPFPyLs5fLb8NSxKvaVvG7pGkBVMF61EUiQ2xkwQa2suY MIME-Version: 1.0 X-Received: by 10.202.217.196 with SMTP id q187mr717293oig.64.1431551450852; Wed, 13 May 2015 14:10:50 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Wed, 13 May 2015 14:10:50 -0700 (PDT) In-Reply-To: References: <1429802693-4582-1-git-send-email-martin.galvan@tallertechnologies.com> Date: Wed, 13 May 2015 21:10: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/msg00346.txt.bz2 On Wed, May 13, 2015 at 2:04 PM, Martin Galvan wrote: > On Wed, May 13, 2015 at 5:58 PM, Doug Evans wrote: >> 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= whose tag was DW_TAG_inlined_subroutine. This meant that dwarf2_physname w= ould simply return the DIE's name attribute (which in our case would be "me= thod"). Therefore, when new_symbol_full called SYMBOL_SET_NAMES, the linkag= ename argument wasn't the demangled name as it should have. >>>> >>>> This patch adds a case which would return 1 for DW_TAG_inlined_subrout= ine 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, struc= t 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. > > Well, considering that it solves a quite important issue and it took > me a really long time to find it, fix it, and then get it commited, > it'd be nice of you if you could fix the author :) Done. Time to get yourself commit access.