This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


> Does that occur with both dwarf2 and stabs?

Yes.

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

Aaaaaaaaah. 

> 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.

Ok.

> 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.

-benjamin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]