can't find class named `foo', as given by C++ RTTI
Daniel Berlin
dan@cgsoftware.com
Thu Jun 28 16:02:00 GMT 2001
Benjamin Kosnik <bkoz@redhat.com> writes:
>> We already rely on being able to get mangled names from debug info too
>> much. This is why the clone constructors have the wrong name (they
>> end up being fred() instead of fred::fred()). Their
>> specification has no DW_AT_MIPS_linkage_name, because it can't. They
>> have no DW_AT_MIPS_linkage_name beause they shouldn't need to.
>>
>> What really should be happening is that we should be generating
>> qualified names on our own, and ignoring DW_AT_MIPS_linkage_name
>> completely.
>
> Ah. I get it now. So this namespace issue is probably the same problem that
> nested types are having...
Yes.
Exactly.
It usually clicks once you realize that all those things named
"std::a::b::c::d" are really all in the same scope (not the global
scope, IIRC, I mean the ones appearing in each file are in that file's
file-level scope), and not in the scope named std::a::b::c.
I.E. It's all an illusion.
There is no spoon.
Nested classes and structs *might* have the right scope, it depends on
the sym reader.
>
> I was wondering about the ctor issue.
>
>> And we should be properly supporting namespaces, using directives,
>> etc, anyway. It would also let us be able to support java packages
>> properly and whatnot.
>
> These are all required features in gdb, not optional features,
> right?
Well, we could start by stop trying to put up the illusion
>
>> I can make gcc output this info in about a day.
>
> Well then.
Patch submitted a little earlier to add support for at least
outputting namespaces (no importing the declarations into other
scopes).
This will give us the ability to make up the qualified names on our
own, at least.
>
>> i've got a collection of references for symbol table
>> designs that can handle these things properly and efficiently, and
>> close enough to the existing basic symbol table structure that you
>> wouldn't have to start anywhere near from scratch, or come up with a
>> design on your own.
>
> Might as well post the links or citations if you've got them handy.
Let me hunt it down, it's somewhere on my FS.
>
> -benjamin
--
"I have a friend named Dennis. Both of his parents were midgets,
but he isn't a midget. He's a midget-dwarf. He's two inches
tall. He's the one who poses for trophies.
"-Steven Wright
More information about the Gdb
mailing list