[rfa/c++] cp_lookup_rtti_type, take 2

David Carlton carlton@kealia.com
Fri Dec 5 17:12:00 GMT 2003


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



More information about the Gdb-patches mailing list