This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix PR 9675 - _static_ variables in C++ constructors
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 23 Apr 2009 16:40:08 -0600
- Subject: Re: [patch] Fix PR 9675 - _static_ variables in C++ constructors
- References: <20081221185428.GA27604@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> Fix visibility of _static_ variables in C++ constructors,
Jan> as I saw it now even in GDB BZ:
Jan> http://sourceware.org/bugzilla/show_bug.cgi?id=9675
Jan> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33044
Jan> https://bugzilla.redhat.com/show_bug.cgi?id=445912
Thanks for writing this.
It took me a while to understand this (I had to go read up on the
DWARF involved), but I think I get what is going on here.
I have a couple comments.
Jan> while (child_die && child_die->tag)
Jan> {
Jan> - process_die (child_die, cu);
Jan> + attr = dwarf2_attr (child_die, DW_AT_abstract_origin, cu);
Jan> + if (!attr)
Jan> + complaint (&symfile_complaints,
Jan> + _("Child DIE 0x%x of DIE 0x%x has missing "
Jan> + "DW_AT_abstract_origin"), child_die->offset,
Jan> + die->offset);
I suspect this complaint is incorrect. DWARF 3.3.8.3 exception #3
says that a DIE in the concrete tree does not necessarily need to
refer to a DIE in the origin tree. If I understand the patch
correctly, this complaint will be issued in exactly this case. Is
that accurate?
Jan> + if (offsetp[-1] == *offsetp)
Jan> + complaint (&symfile_complaints,
Jan> + _("Child DIEs of DIE 0x%x duplicitly abstract-origin "
Jan> + "referenced DIE 0x%x"), die->offset, *offsetp);
This text reads strangely. How about:
Multiple children of DIE 0x%s refer to DIE 0x%x as their abstract origin
Other than these things this patch looks ok to me.
Tom