diff options
author | Tom Tromey <tromey@redhat.com> | 2010-09-01 21:50:24 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-09-01 21:50:24 +0000 |
commit | 8f83e95a50017fac2f6623663697545083bf0f44 (patch) | |
tree | 1871fcd4c8feb982ea4d2ef2cc24305a514a79ea /gdb/symfile.h | |
parent | f05c8cbcb247f29797e88a729847c9b845efd379 (diff) | |
download | gdb-8f83e95a50017fac2f6623663697545083bf0f44.tar.gz |
* symtab.h (lookup_type_symbol): Declare.
* symtab.c (lookup_symbol_in_language_full): Rename from
lookup_symbol_in_language. Add 'for_type' argument.
(lookup_symbol_in_language): New function.
(lookup_type_symbol): Likewise.
(lookup_symbol_aux): Add 'for_type' argument.
(match_symbol_aux): New function.
(lookup_symbol_aux_symtabs): Use expand_one_symtab_matching.
(match_transparent_type): New function.
(basic_lookup_transparent_type): Use expand_one_symtab_matching.
* symfile.h (struct quick_symbol_functions)
<pre_expand_symtabs_matching>: Remove.
<expand_one_symtab_matching>: New field.
* psymtab.c (expand_one_symtab_matching_psymtabs): New function.
(pre_expand_symtabs_matching_psymtabs): Remove.
(psym_functions): Update.
* gdbtypes.c (lookup_typename): Use lookup_type_symbol.
* dwarf2read.c (dw2_lookup_symbol): Update comment.
(dw2_pre_expand_symtabs_matching): Remove.
(dw2_expand_one_symtab_matching): New function.
(dwarf2_gdb_index_functions): Update.
Diffstat (limited to 'gdb/symfile.h')
-rw-r--r-- | gdb/symfile.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/gdb/symfile.h b/gdb/symfile.h index 58153542db0..84b770d2f37 100644 --- a/gdb/symfile.h +++ b/gdb/symfile.h @@ -171,14 +171,25 @@ struct quick_symbol_functions int kind, const char *name, domain_enum domain); - /* This is called to expand symbol tables before looking up a - symbol. A backend can choose to implement this and then have its - `lookup_symbol' hook always return NULL, or the reverse. (It - doesn't make sense to implement both.) The arguments are as for - `lookup_symbol'. */ - void (*pre_expand_symtabs_matching) (struct objfile *objfile, - int kind, const char *name, - domain_enum domain); + /* Expand each symbol table in OBJFILE that may have items matching + KIND, NAME, and DOMAIN -- these arguments are as for + `lookup_symbol'. For each such symbol table, call MATCHER with + the symbol table and DATA arguments. If MATCHER returns NULL, + keep going. Otherwise, return the result of MATCHER. If MATCHER + never returns non-NULL, return NULL. A backend can choose to + implement this and then have its `lookup_symbol' hook always + return NULL, or the reverse. (It doesn't make sense to implement + both.) */ + struct symbol *(*expand_one_symtab_matching) + (struct objfile *objfile, + int kind, const char *name, + domain_enum domain, + struct symbol *(*matcher) (struct symtab *symtab, + int kind, + const char *name, + domain_enum domain, + void *data), + void *data); /* Print statistics about any indices loaded for OBJFILE. The statistics should be printed to gdb_stdout. This is used for |