[D] Support looking up symbols in the current and imported modules.
authorIain Buclaw <ibuclaw@gdcproject.org>
Thu, 13 Aug 2015 18:34:15 +0000 (20:34 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Thu, 13 Aug 2015 19:07:09 +0000 (21:07 +0200)
commitbc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144
tree7b016c69aeb9253d52045f9fa374a063f125d911
parent52bbc560524ec3691203eccd05207d13913a1e35
[D] Support looking up symbols in the current and imported modules.

In D, there is the notion of modules, and importing from one to the other,
whether it is a basic, selective or renamed import declaration.

module A;
import X;
void foo() {
  import Y : bar;
}

If the compiler emits DW_TAG_imported_declaration at the appropriate locations,
then we can make use of what gdb stores in using_direct when performing
nonlocal symbol lookups.

gdb/ChangeLog

* Makefile.in (SFILES): Add d-namespace.c.
(COMMON_OBS): Add d-namespace.o.
* d-lang.c (d_language_defn): Use d_lookup_symbol_nonlocal as the
la_lookup_symbol_nonlocal callback function pointer.
* d-lang.h (d_lookup_symbol_nonlocal): New declaration.
(d_lookup_nested_symbol): New declaration.
* d-namespace.c: New file.
gdb/ChangeLog
gdb/Makefile.in
gdb/d-lang.c
gdb/d-lang.h
gdb/d-namespace.c [new file with mode: 0644]
This page took 0.026012 seconds and 4 git commands to generate.