From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27512 invoked by alias); 8 Sep 2010 17:25:13 -0000 Received: (qmail 27500 invoked by uid 22791); 8 Sep 2010 17:25:12 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.17.167) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Sep 2010 17:25:06 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.13.1/8.13.1) with ESMTP id o88HOptc004964 for ; Wed, 8 Sep 2010 17:24:51 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o88HOprg4116662 for ; Wed, 8 Sep 2010 19:24:51 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id o88HOp9K006488 for ; Wed, 8 Sep 2010 19:24:51 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id o88HOoTD006483; Wed, 8 Sep 2010 19:24:50 +0200 Message-Id: <201009081724.o88HOoTD006483@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Wed, 08 Sep 2010 19:24:50 +0200 Subject: [rfc] Remove "(anonymous class)" dummy name in partial DIEs To: gdb-patches@sourceware.org, drow@false.org Date: Wed, 08 Sep 2010 18:03:00 -0000 From: "Ulrich Weigand" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2010-09/txt/msg00181.txt.bz2 Hello, I'm seeing lot of error messages along the lines of "(anonymous class) is defined only in psymtab" when running "maint check-symtabs" on ARM when glibc debug info is available. This seems to be caused by the fact that partial DIEs corresponding to anonymous structs or classes get a dummy name of "(anonymous class)" in fixup_partial_die, while the corresponding DIEs of full symbols will actually have a NULL name. This discrepancy is detected by the check-symtabs command ... The dummy name "(anonymous class)" was introduced in this patch: http://sourceware.org/ml/gdb-patches/2004-04/msg00070.html but I'm not quite sure why this was done. Dan, do you recall? In any case, simply removing this dummy name fixes the check-symtabs output, without introducing any testsuite regressions. Tested on armv7l-linux-gnueabi and i686-linux. Is there any reason I'm missing why this dummy name should be set? Bye, Ulrich ChangeLog: * dwarf2read.c (fixup_partial_die): Do not set dummy name for anonymous class partial DIEs. Index: gdb/dwarf2read.c =================================================================== RCS file: /cvs/src/src/gdb/dwarf2read.c,v retrieving revision 1.450 diff -u -p -r1.450 dwarf2read.c --- gdb/dwarf2read.c 1 Sep 2010 21:50:24 -0000 1.450 +++ gdb/dwarf2read.c 8 Sep 2010 17:06:01 -0000 @@ -9024,9 +9024,6 @@ fixup_partial_die (struct partial_die_in } /* Set default names for some unnamed DIEs. */ - if (part_die->name == NULL && (part_die->tag == DW_TAG_structure_type - || part_die->tag == DW_TAG_class_type)) - part_die->name = "(anonymous class)"; if (part_die->name == NULL && part_die->tag == DW_TAG_namespace) part_die->name = "(anonymous namespace)"; -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com