From patchwork Thu Apr 23 15:24:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Galvan X-Patchwork-Id: 6401 Received: (qmail 7554 invoked by alias); 23 Apr 2015 15:25:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 7544 invoked by uid 89); 23 Apr 2015 15:25:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_00, KAM_STOCKGEN, RCVD_IN_DNSWL_LOW, SPF_SOFTFAIL autolearn=no version=3.3.2 X-HELO: mail-qk0-f179.google.com Received: from mail-qk0-f179.google.com (HELO mail-qk0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 23 Apr 2015 15:25:02 +0000 Received: by qku63 with SMTP id 63so12568087qku.3 for ; Thu, 23 Apr 2015 08:25:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=6w14ZD809NTUmvfGhCskT8xj1VFCb25TkGTMZh0fJyk=; b=Y4BsbjMoWFrH6oFYsdegVwqiVUwO+MuFT/3640x8buB2nOVRzJpQYs09GFUvIm+5qN RM/WIHCIsEx8MLDolVNfM3xEvGVV/usjzoZ2zwNjpH+MRbrC7Na2YwBR0Frc0pl+B4Le 0inA/Iz14MDtToYuxrDtE6wppe5gxOpg0sBm+uhc7wLRScGht5HQg43AUz8Q5l8Y2Cxd EBEp4Ks4MX3b8O8y8m5mnk5986M/42PVxa9aZTVVwL0a4VgCoN3PNwhtRgpHnzIyijdT RUTfTKgDZfguZbQjvmFjWfKTuQzrvsZa1cy7AH74KMeDQE3F7hTR6BzWoDYx/D/9NJcT uvNg== X-Gm-Message-State: ALoCoQkwLXsT7NwuiV213acMzeaiRE9H/cgwA9HndCPhcmcnc4BTiPsIN6w34dnIu6TB6fafx5x+ X-Received: by 10.140.165.150 with SMTP id l144mr3838571qhl.99.1429802700112; Thu, 23 Apr 2015 08:25:00 -0700 (PDT) Received: from martin-galvan.dominio.tallertechnologies.com ([200.69.202.173]) by mx.google.com with ESMTPSA id p81sm6160724qkp.6.2015.04.23.08.24.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Apr 2015 08:24:59 -0700 (PDT) From: Martin Galvan To: gdb-patches@sourceware.org Subject: [PING][PATCH] Fix PR gdb/17720 (Function names appear without namespace/class prefixes in backtrace for optimized code) Date: Thu, 23 Apr 2015 12:24:53 -0300 Message-Id: <1429802693-4582-1-git-send-email-martin.galvan@tallertechnologies.com> 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 would simply return the DIE's name attribute (which in our case would be "method"). Therefore, when new_symbol_full called SYMBOL_SET_NAMES, the linkagename 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, 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(+) -- 2.3.5 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;