This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: adding namespace support to GDB
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: David Carlton <carlton at math dot stanford dot edu>,Petr Sorfa <petrs at caldera dot com>, gdb <gdb at sources dot redhat dot com>
- Date: Fri, 23 Aug 2002 14:48:46 -0400 (EDT)
- Subject: Re: adding namespace support to GDB
- Reply-to: dberlin at dberlin dot org
On Fri, 23 Aug 2002, Daniel Jacobowitz wrote:
> On Fri, Aug 23, 2002 at 11:41:06AM -0700, David Carlton wrote:
> > In article <3D6677D3.6E84743C@caldera.com>, Petr Sorfa
> > <petrs@caldera.com> writes:
> >
> > > Well to help things along I will be submitting a DWARF patch that
> > > will supported imported declarations which are essential for FORTRAN
> > > modules and C++ namespaces.
> >
> > Great, I look forward to reading it.
> >
> > > This is essential for the "using" commands in either language (of
> > > course the compiler needs to generate the correct DWARF
> > > ;o)).
> >
> > Yes, well, there is always that. Certainly it seems like a solution
> > for C++ will initially have to get recreate namespace info from
> > DW_AT_MIPS_linkage_name, and there's no way that we'll be able to
> > allow users to use symbol names as if all the appropriate using
> > directives were in effect, since that information simply isn't in the
> > debug information that GCC is currently producing. (Though that's not
> > the end of the world: we should be able to do name lookup using C++'s
> > name resolution rules based on the enclosing function and its
> > arguments, presumably.)
>
> C++ certainly does _not_ need to reconstruct from
> DW_AT_MIPS_linkage_name. Everything we need should be there in
> DW_TAG_namespace and DW_TAG_structure/class markers; I have patches to
> use this information, with the caveats I noted in my other message.
If you hunt through the gcc patch archives, you'll find my patches to
produce DW_AT_namespace, approved twice by Jason Merrill.
Should still apply cleanly.
>
> I am gradually working on removing all uses of the physname from the
> C++ debugging code. It's a hack (and a space waste!).
>
>