summaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-05-20 01:55:18 +0000
committerDavid Carlton <carlton@bactrian.org>2003-05-20 01:55:18 +0000
commit854fc6461e102fe6846a0fcd6fa0cd809fb359ce (patch)
tree8bbb785f2361b9b977c3bc7484d4408d2e4ea8de /gdb/symtab.h
parent4af17108f2894052611290bd4c7179317ba3d450 (diff)
downloadgdb-854fc6461e102fe6846a0fcd6fa0cd809fb359ce.tar.gz
2003-05-19 David Carlton <carlton@bactrian.org>
* 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.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index f8be03b75ab..26ea51ea4d2 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -988,6 +988,45 @@ extern struct symbol *lookup_symbol (const char *, const struct block *,
const domain_enum, int *,
struct symtab **);
+/* A default version of lookup_symbol_nonlocal for use by languages
+ that can't think of anything better to do. */
+
+extern struct symbol *basic_lookup_symbol_nonlocal (const char *,
+ const char *,
+ const struct block *,
+ const domain_enum,
+ struct symtab **);
+
+/* Some helper functions for languages that need to write their own
+ lookup_symbol_nonlocal functions. */
+
+/* Lookup a symbol in the static block associated to BLOCK, if there
+ is one; do nothing if BLOCK is NULL or a global block. */
+
+extern struct symbol *lookup_symbol_static (const char *name,
+ const char *linkage_name,
+ const struct block *block,
+ const domain_enum domain,
+ struct symtab **symtab);
+
+/* Lookup a symbol in all files' global blocks (searching psymtabs if
+ necessary). */
+
+extern struct symbol *lookup_symbol_global (const char *name,
+ const char *linkage_name,
+ const domain_enum domain,
+ struct symtab **symtab);
+
+/* Lookup a symbol within the block BLOCK. This, unlike
+ lookup_symbol_block, will set SYMTAB and BLOCK_FOUND correctly, and
+ will fix up the symbol if necessary. */
+
+extern struct symbol *lookup_symbol_aux_block (const char *name,
+ const char *linkage_name,
+ const struct block *block,
+ const domain_enum domain,
+ struct symtab **symtab);
+
/* lookup a symbol by name, within a specified block */
extern struct symbol *lookup_block_symbol (const struct block *, const char *,