This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rfc] Remove "(anonymous class)" dummy name in partial DIEs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]