diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2015-08-13 20:34:15 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2015-08-13 21:07:09 +0200 |
commit | bc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144 (patch) | |
tree | 7b016c69aeb9253d52045f9fa374a063f125d911 /gdb/d-lang.h | |
parent | 52bbc560524ec3691203eccd05207d13913a1e35 (diff) | |
download | gdb-bc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144.zip gdb-bc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144.tar.gz gdb-bc7c9fab612d4d33f7fe5d17eef4f5bd5cdc4144.tar.bz2 |
[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.
Diffstat (limited to 'gdb/d-lang.h')
-rw-r--r-- | gdb/d-lang.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/d-lang.h b/gdb/d-lang.h index 4962a8a..8b8b5dc 100644 --- a/gdb/d-lang.h +++ b/gdb/d-lang.h @@ -68,6 +68,16 @@ extern char *d_demangle (const char *mangled, int options); extern const struct builtin_d_type *builtin_d_type (struct gdbarch *); +/* Defined in d-namespace.c */ + +extern struct block_symbol d_lookup_symbol_nonlocal (const struct language_defn *, + const char *, + const struct block *, + const domain_enum); + +extern struct block_symbol d_lookup_nested_symbol (struct type *, const char *, + const struct block *); + /* Defined in d-valprint.c */ extern void d_val_print (struct type *type, const gdb_byte *valaddr, |