From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12384 invoked by alias); 31 Mar 2011 16:23:43 -0000 Received: (qmail 12360 invoked by uid 22791); 31 Mar 2011 16:23:41 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 16:23:37 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2VGNa7k012081 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Mar 2011 12:23:36 -0400 Received: from host1.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2VGNYA3009761 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Mar 2011 12:23:36 -0400 Received: from host1.jankratochvil.net (localhost [127.0.0.1]) by host1.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p2VGNXaZ011971; Thu, 31 Mar 2011 18:23:33 +0200 Received: (from jkratoch@localhost) by host1.jankratochvil.net (8.14.4/8.14.4/Submit) id p2VGNWCR011965; Thu, 31 Mar 2011 18:23:32 +0200 Date: Thu, 31 Mar 2011 19:12:00 -0000 From: Jan Kratochvil To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: Regression: Re: RFC: update for GCC PR 47510 Message-ID: <20110331162332.GA30645@host1.jankratochvil.net> References: <20110330062501.GA14148@host1.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110330062501.GA14148@host1.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-03/txt/msg01223.txt.bz2 On Wed, 30 Mar 2011 08:25:01 +0200, Jan Kratochvil wrote: > This commit 96bfe92de6c67763182b1492c24c8edea9e00e1b has a regression on > Fedora 15 (x86_64 and i686 native, not x86_64-m32) using > gcc-4.6.0-0.15.fc15.x86_64: It is reproducible only with gcc-debuginfo-4.6.0-0.15.fc15.x86_64 installed. Which also explains why only x86_64-m32 was not affected (as Fedora does not support biarch debuginfo rpms). It fixes exactly the regressions described with otherwise no regressions on {x86_64,x86_64-m32,i686}-fedora15-linux-gnu. A debug dump has shown: from <6ldiv_t> DIE offset=0x1caa objfile=/usr/lib/debug/usr/lib64/libstdc++.so.6.0.15.debug CU offset=0x0 from DIE offset=0x1caa objfile=/usr/lib/debug/usr/lib64/libstdc++.so.6.0.15.debug CU offset=0x0 Although I was unable to reproduce that ldiv_t->long demangling on commandline but I understand it was an incorrect operation. $ c++filt -t -s gnu-v3 6ldiv_t ldiv_t $ c++filt -t -s gnu-v3 ldiv_t ldiv_t (not `long') Thanks, Jan gdb/ 2011-03-31 Jan Kratochvil * dwarf2read.c (dwarf2_name): Initialize DEMANGLED. Avoid demangling struct linkage name twice. --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -12043,7 +12043,7 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47510. */ if (!attr || DW_STRING (attr) == NULL) { - char *demangled; + char *demangled = NULL; attr = dwarf2_attr (die, DW_AT_linkage_name, cu); if (attr == NULL) @@ -12052,7 +12052,10 @@ dwarf2_name (struct die_info *die, struct dwarf2_cu *cu) if (attr == NULL || DW_STRING (attr) == NULL) return NULL; - demangled = cplus_demangle (DW_STRING (attr), DMGL_TYPES); + /* Avoid demangling DW_STRING (attr) the second time on a second + call for the same DIE. */ + if (!DW_STRING_IS_CANONICAL (attr)) + demangled = cplus_demangle (DW_STRING (attr), DMGL_TYPES); if (demangled) {