This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
Re: gdb/488: vtable, RTTI, and namespaces don't work together
- From: David Carlton <carlton at math dot stanford dot edu>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 21 Nov 2002 21:18:01 -0000
- Subject: Re: gdb/488: vtable, RTTI, and namespaces don't work together
- Reply-to: David Carlton <carlton at math dot stanford dot edu>
The following reply was made to PR gdb/488; it has been noted by GNATS.
From: David Carlton <carlton@math.stanford.edu>
To: John LIlley <jlilley@empathy.com>
Cc: nobody@sources.redhat.com, gdb-prs@sources.redhat.com,
gdb-gnats@sources.redhat.com, Daniel Jacobowitz <drow@mvista.com>,
jelenz@students.wisc.edu
Subject: Re: gdb/488: vtable, RTTI, and namespaces don't work together
Date: 21 Nov 2002 13:15:11 -0800
On 21 Nov 2002 20:38:00 -0000, John LIlley <jlilley@empathy.com> said:
> I recently encountered the debugger problem described in:
> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=488
> Do you know if this has been fixed (or is there a known workaround
> or patch) for gcc 3.2? The audit trail implies that gcc/g++ with
> -g or maybe -gdwarf-2 will fix this sometime in the near future...
Not yet, though the output that I get isn't as bad as described in the
bug report: I get
(gdb) p *bar
warning: can't find class named `Name::Bar', as given by C++ RTTI
$2 = {<Foo> = {_vptr.Foo = 0x8049a40, a = 6}, b = 3}
So there's an unfortunate warning, but at least we can print out *bar,
unlike in GDB 5.2.1. This is the way that GDB 5.3 will behave;
hopefully, that will be released in a couple of weeks, but if you're
in a hurry then download the current CVS GDB from the GDB web site.
It would be nice if the warning went away. The underlying issue is
that GDB currently has no idea when classes live in namespaces. This
should be fixed in a branch shortly (within the next week or two?), as
part of a general namespace overhaul; I'm not sure when that will be
integrated into CVS GDB (probably not until 2003, but hopefully the
integration will start in the beginning of 2003), and it will make it
into a released version of GDB eventually. There are also still
issues with GCC's debug info, though they are less severe than the
problems with GDB, and won't cause insurmountable problems in this
particular case.
David Carlton
carlton@math.stanford.edu
http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=488