This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] D: support reading modules from DWARF
- From: Doug Evans <xdje42 at gmail dot com>
- To: Iain Buclaw <ibuclaw at gdcproject dot org>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 18 Jul 2015 11:01:22 -0700
- Subject: Re: [PATCH] D: support reading modules from DWARF
- Authentication-results: sourceware.org; auth=none
- References: <CABOHX+cT+Zucmxn7jfuRF-hH-5scjiWGSf3wzDCZXXRfnN8-Tg at mail dot gmail dot com>
Iain Buclaw <ibuclaw@gdcproject.org> writes:
> Hi,
>
> D uses modules (DW_TAG_module), but to separate the namespace of every
> source file. Modules can be imported into each other, either publicly
> or privately (DW_TAG_imported_module). Or declarations can be
> selectively imported or renamed (DW_TAG_imported_decl).
>
> This patch pretty much just extends the existing support for
> namespaces/modules in C++/Fortran/Java to include language_d too.
> However unlike Fortran/C++, the separator for qualified names is a
> single dot.
>
> This will need to be followed up with a patch to support looking up
> symbols in D module 'namespaces'. However I'm currently unsure
> whether to either extend cp-namespace.c, or to go ahead with my
> current fork (d-namespace.c), which copies only what's needed,
> adjusting for D-specific symbol import logic.
Hi.
Re: cp-namespace.c:
Hard to say without seeing the patch,
but having spent a lot of time cleaning up cp-namespace.c
I'm not fond of complicating it again to handle more languages.
So, and again I'd have to see the patch to be sure,
I'd say plan on going with d-namespace.c.