This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [rfa] fix for PR c++/1553


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


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