This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa/c++] cp_lookup_rtti_type, take 2
- From: David Carlton <carlton at kealia dot com>
- To: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- Cc: drow at mvista dot com, gdb-patches at sources dot redhat dot com
- Date: Fri, 05 Dec 2003 09:12:37 -0800
- Subject: Re: [rfa/c++] cp_lookup_rtti_type, take 2
- References: <20031205042237.56AFD4B35C@berman.michael-chastain.com>
On Thu, 4 Dec 2003 23:22:37 -0500 (EST), mec.gnu@mindspring.com
(Michael Elizabeth Chastain) said:
>> The only reason we can do it by symbol lookup at all is the One
>> Definition Rule, and we should probably be restricting ourselves to the
>> objfile in which we found the minimal symbol.
> Yes, it's still very flaky. The only reason it works now is that
> there is a low-priority "fallback" search over all static blocks.
> That is just more trouble waiting to happen.
Yeah, but my current patch awaiting approval fixes that. Those
symbols shouldn't be static in the first place.
> We've got a vtbl pointer, and we want type information for it.
> So we translate:
> vtbl address -> minsym
> minsym -> mangled name
> mangled name -> demangled name
> demangled name -> prefix
> prefix -> symbol
> symbol -> type
> Maybe we should just go from the vtbl address to the symbol without
> converting to a name and back again?!
It would be nice if we could eventually short-circuit much or all of
this. As Daniel likes to point out, we should try to reduce our
demangler dependencies wherever possible, and this is a particularly
unpleasant one.
> In retrospect, my new lookup_rtti_type should take the domain as a
> parameter.
I think that would be more confusing.
David Carlton
carlton@kealia.com