aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-04-17 09:35:04 -0600
committerTom Tromey <tom@tromey.com>2021-04-17 09:35:05 -0600
commit84d865e39c3739097d7a3481b9c9b6b6fecb2b06 (patch)
tree564ba47ed285702b5c3a852def5321870287b1c3 /gdb/objfiles.h
parent3bfa51a75fc18775ea043efb248d0e2c35103202 (diff)
downloadgdb-84d865e39c3739097d7a3481b9c9b6b6fecb2b06.zip
gdb-84d865e39c3739097d7a3481b9c9b6b6fecb2b06.tar.gz
gdb-84d865e39c3739097d7a3481b9c9b6b6fecb2b06.tar.bz2
Remove quick_symbol_functions::lookup_symbol
This removes quick_symbol_functions, replacing it with calls to expand_symtabs_matching. Because the replacement is somewhat verbose, objfile::lookup_symbol is not removed. This consolidates some duplicated code into this one spot. gdb/ChangeLog 2021-04-17 Tom Tromey <tom@tromey.com> * symfile-debug.c (objfile::lookup_symbol): Rewrite. * quick-symbol.h (struct quick_symbol_functions) <lookup_symbol>: Remove. * psymtab.c (psymbol_functions::lookup_symbol): Remove. * psympriv.h (struct psymbol_functions) <lookup_symbol>: Remove. * objfiles.h (struct objfile) <lookup_symbol>: Add comment. * dwarf2/read.c (struct dwarf2_gdb_index) <lookup_symbol>: Remove. (struct dwarf2_debug_names_index) <lookup_symbol>: Remove. (dwarf2_gdb_index::lookup_symbol) (dwarf2_debug_names_index::lookup_symbol): Remove.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index ec64b1c..31914d5 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -576,7 +576,16 @@ public:
(const char *name, const char *real_path,
gdb::function_view<bool (symtab *)> callback);
- /* See quick_symbol_functions. */
+ /* Check to see if the symbol is defined in a "partial" symbol table
+ of this objfile. BLOCK_INDEX should be either GLOBAL_BLOCK or
+ STATIC_BLOCK, depending on whether we want to search global
+ symbols or static symbols. NAME is the name of the symbol to
+ look for. DOMAIN indicates what sort of symbol to search for.
+
+ Returns the newly-expanded compunit in which the symbol is
+ defined, or NULL if no such symbol table exists. If OBJFILE
+ contains !TYPE_OPAQUE symbol prefer its compunit. If it contains
+ only TYPE_OPAQUE symbol(s), return at least that compunit. */
struct compunit_symtab *lookup_symbol (block_enum kind, const char *name,
domain_enum domain);