can't find class named `foo', as given by C++ RTTI

Benjamin Kosnik
Thu Jun 28 01:37:00 GMT 2001

> Does that occur with both dwarf2 and stabs?


> > Is special namespace support really necessary?
> Special?
> You mean special as in "any whatsoever"?
> Yes.


> The dwarf2 standard doesn't say the names given are to be fully
> qualified. In fact, just the opposite is the general practice. If you
> want fully qualified names, you are expected to generate them, which
> isn't all that tricky to do.


> Think of what happens if you have:
> DW_TAG_namespace:
>         DW_AT_name "std"
>         DW_TAG_class:
>                 DW_AT_name "std::numpunct<char>"
> ...
> DW_TAG_namespace:
>         DW_AT_name "danspace"
>         DW_TAG_using:
>                 DW_AT_name "std"
> Now, if we don't change the symbol structures, and do this by copying
> all the symbols in std to the block for danspace, gdb will print out, and
> treat, the names as if they were "danspace::std::numpunct<char>".
> This is why we need to generate the qualified names ourselves.
> The non-hack solution here is to add namespace support to gcc's dwarf2
> output, and gdb's dwarf2 reader.

Ok. Thanks. I wasn't thinking about types, and aliasing namespaces. It's 
encouraging to see the support for scoping in other parts of gdb, 
although symbol support seems lacking.


More information about the Gdb mailing list