This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] fix for PR c++/1553
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: David Carlton <carlton at kealia dot com>
- Cc: gdb-patches at sources dot redhat dot com, Elena Zannoni <ezannoni at redhat dot com>,Michael Elizabeth Chastain <mec at shout dot net>
- Date: Tue, 24 Feb 2004 15:03:32 -0500
- Subject: Re: [rfa] fix for PR c++/1553
- References: <m3ptc4nyb9.fsf@coconut.kealia.com>
On Tue, Feb 24, 2004 at 10:10:18AM -0800, David Carlton wrote:
> Here's a fix for PR c++/1553. It cleans up a botch I made in
> dwarf2read.c:read_structure_scope: I had all this conditional logic
> for determining the name, including a case where the code basically
> says "well, it would be a little bit of work to get the name right
> now, so let's remember that we got it wrong and try to fix the
> situation later". And, of course, not only is this fragile and a
> maintenance problem, it proved to be buggy - I got abstract
> declarations of nested classes wrong, basically.
FWIW, the new logic looks right to me, and the old logic was definitely
wrong; I noticed it when I tried to separate this function in two on
the intercu branch on Sunday.
I think your handling for nested classes in determine_prefix is wrong
also; it walks the parents of structs even though structs are sometimes
given fully qualified names. I think I managed to create a testcase
where class names would be repeated. But now I can't find the testcase
so I may have been playing with my own broken code instead.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer