[PATCH] D: support reading modules from DWARF

Iain Buclaw ibuclaw@gdcproject.org
Mon Jul 13 17:47:00 GMT 2015


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.

Iain.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlang-modules.patch
Type: text/x-diff
Size: 3594 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20150713/153773a8/attachment.bin>


More information about the Gdb-patches mailing list