From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Kosnik To: Daniel Berlin Cc: gdb@sources.redhat.com Subject: Re: can't find class named `foo', as given by C++ RTTI Date: Thu, 28 Jun 2001 01:37:00 -0000 Message-id: References: <873d8li0hh.fsf@cgsoftware.com> X-SW-Source: 2001-06/msg00213.html > 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" > ... > 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". > > 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