From 5f9a71c3d74f62fb4e6a3fe0007044f429638a60 Mon Sep 17 00:00:00 2001 From: David Carlton Date: Tue, 20 May 2003 01:55:18 +0000 Subject: 2003-05-19 David Carlton * language.h (struct language_defn): Add 'la_value_of_this' and 'la_lookup_symbol_nonlocal' members. * symtab.h: Declare basic_lookup_symbol_nonlocal, lookup_symbol_static, lookup_symbol_global, lookup_symbol_aux_block. * symtab.c (lookup_symbol_aux): Call language hooks to determine if we should search fields of this and how to do static/global lookup. (lookup_symbol_aux_block): Make extern. (basic_lookup_symbol_nonlocal): New. (lookup_symbol_static, lookup_symbol_global): Ditto. * ada-lang.c (ada_language_defn): Set 'la_value_of_this' and 'la_lookup_symbol_nonlocal' members. * c-lang.c (c_language_defn, cplus_language_defn) (asm_language_defn, minimal_language_defn): Ditto. * jv-lang.c (java_language_defn): Ditto. * language.c (unknown_language_defn, auto_language_defn) (local_language_defn): Ditto. * m2-lang.c (m2_language_defn): Ditto. * objc-lang.c (objc_language_defn): Ditto. * scm-lang.c (scm_language_defn): Ditto. * f-lang.c (f_language_defn): Ditto, and include value.h as well. * p-lang.c (pascal_language_defn): Ditto for both. * Makefile.in (f-lang.o): Depend on value_h. (p-lang.o): Ditto. --- gdb/language.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gdb/language.h') diff --git a/gdb/language.h b/gdb/language.h index f55c9f0..a1a73a5 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -211,6 +211,27 @@ struct language_defn if it isn't a language tramp for this language. */ CORE_ADDR (*skip_trampoline) (CORE_ADDR pc); + /* Now come some hooks for lookup_symbol. */ + + /* If this is non-NULL, lookup_symbol will do the 'field_of_this' + check, using this function to find the value of this. */ + + /* FIXME: carlton/2003-05-19: Audit all the language_defn structs + to make sure we're setting this appropriately: I'm sure it + could be NULL in more languages. */ + + struct value *(*la_value_of_this) (int complain); + + /* This is a function that lookup_symbol will call when it gets to + the part of symbol lookup where C looks up static and global + variables. */ + + struct symbol *(*la_lookup_symbol_nonlocal) (const char *, + const char *, + const struct block *, + const domain_enum, + struct symtab **); + /* Return demangled language symbol, or NULL. */ char *(*la_demangle) (const char *mangled, int options); -- cgit v1.1