aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c66
1 files changed, 34 insertions, 32 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 7d6648c..516ba72 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1,6 +1,6 @@
/* Partial symbol tables.
- Copyright (C) 2009-2024 Free Software Foundation, Inc.
+ Copyright (C) 2009-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -87,7 +87,7 @@ static struct partial_symtab *
find_pc_sect_psymtab_closer (struct objfile *objfile,
CORE_ADDR pc, struct obj_section *section,
struct partial_symtab *pst,
- struct bound_minimal_symbol msymbol)
+ bound_minimal_symbol msymbol)
{
struct partial_symtab *tpst;
struct partial_symtab *best_pst = pst;
@@ -161,7 +161,7 @@ struct partial_symtab *
psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile,
CORE_ADDR pc,
struct obj_section *section,
- struct bound_minimal_symbol msymbol)
+ bound_minimal_symbol msymbol)
{
for (partial_symtab *pst : partial_symbols (objfile))
if (pc >= pst->text_low (objfile) && pc < pst->text_high (objfile))
@@ -181,12 +181,11 @@ psymbol_functions::find_pc_sect_psymtab (struct objfile *objfile,
the definition of quick_symbol_functions in symfile.h. */
struct compunit_symtab *
-psymbol_functions::find_pc_sect_compunit_symtab
- (struct objfile *objfile,
- struct bound_minimal_symbol msymbol,
- CORE_ADDR pc,
- struct obj_section *section,
- int warn_if_readin)
+psymbol_functions::find_pc_sect_compunit_symtab (struct objfile *objfile,
+ bound_minimal_symbol msymbol,
+ CORE_ADDR pc,
+ struct obj_section *section,
+ int warn_if_readin)
{
struct partial_symtab *ps = find_pc_sect_psymtab (objfile,
pc, section,
@@ -528,6 +527,12 @@ print_partial_symbols (struct gdbarch *gdbarch, struct objfile *objfile,
case COMMON_BLOCK_DOMAIN:
gdb_puts ("common block domain, ", outfile);
break;
+ case TYPE_DOMAIN:
+ gdb_puts ("type domain, ", outfile);
+ break;
+ case FUNCTION_DOMAIN:
+ gdb_puts ("function domain, ", outfile);
+ break;
default:
gdb_puts ("<invalid domain>, ", outfile);
break;
@@ -730,10 +735,9 @@ psymbol_functions::expand_all_symtabs (struct objfile *objfile)
the definition of quick_symbol_functions in symfile.h. */
void
-psymbol_functions::map_symbol_filenames
- (struct objfile *objfile,
- gdb::function_view<symbol_filename_ftype> fun,
- bool need_fullname)
+psymbol_functions::map_symbol_filenames (objfile *objfile,
+ symbol_filename_listener fun,
+ bool need_fullname)
{
for (partial_symtab *ps : partial_symbols (objfile))
{
@@ -792,13 +796,11 @@ psymtab_to_fullname (struct partial_symtab *ps)
various psymtabs that it searches. */
static bool
-recursively_search_psymtabs
- (struct partial_symtab *ps,
- struct objfile *objfile,
- block_search_flags search_flags,
- domain_search_flags domain,
- const lookup_name_info &lookup_name,
- gdb::function_view<expand_symtabs_symbol_matcher_ftype> sym_matcher)
+recursively_search_psymtabs (partial_symtab *ps, objfile *objfile,
+ block_search_flags search_flags,
+ domain_search_flags domain,
+ const lookup_name_info &lookup_name,
+ expand_symtabs_symbol_matcher sym_matcher)
{
int keep_going = 1;
enum psymtab_search_status result = PST_SEARCHED_AND_NOT_FOUND;
@@ -889,12 +891,13 @@ recursively_search_psymtabs
bool
psymbol_functions::expand_symtabs_matching
(struct objfile *objfile,
- gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
+ expand_symtabs_file_matcher file_matcher,
const lookup_name_info *lookup_name,
- gdb::function_view<expand_symtabs_symbol_matcher_ftype> symbol_matcher,
- gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify,
+ expand_symtabs_symbol_matcher symbol_matcher,
+ expand_symtabs_expansion_listener expansion_notify,
block_search_flags search_flags,
- domain_search_flags domain)
+ domain_search_flags domain,
+ expand_symtabs_lang_matcher lang_matcher ATTRIBUTE_UNUSED)
{
/* Clear the search flags. */
for (partial_symtab *ps : partial_symbols (objfile))
@@ -1083,7 +1086,7 @@ void
partial_symtab::add_psymbol (std::string_view name, bool copy_name,
domain_enum domain,
enum address_class theclass,
- short section,
+ int section,
psymbol_placement where,
unrelocated_addr coreaddr,
enum language language,
@@ -1281,7 +1284,7 @@ maintenance_print_psymbols (const char *args, int from_tty)
if (address_arg != NULL)
{
- struct bound_minimal_symbol msymbol;
+ bound_minimal_symbol msymbol;
/* We don't assume each pc has a unique objfile (this is for
debugging). */
@@ -1549,9 +1552,7 @@ maintenance_check_psymtabs (const char *ignore, int from_tty)
}
}
-void _initialize_psymtab ();
-void
-_initialize_psymtab ()
+INIT_GDB_FILE (psymtab)
{
add_cmd ("psymbols", class_maintenance, maintenance_print_psymbols, _("\
Print dump of current partial symbol definitions.\n\
@@ -1559,7 +1560,8 @@ Usage: mt print psymbols [-objfile OBJFILE] [-pc ADDRESS] [--] [OUTFILE]\n\
mt print psymbols [-objfile OBJFILE] [-source SOURCE] [--] [OUTFILE]\n\
Entries in the partial symbol table are dumped to file OUTFILE,\n\
or the terminal if OUTFILE is unspecified.\n\
-If ADDRESS is provided, dump only the symbols for the file with code at that address.\n\
+If ADDRESS is provided, dump only the symbols for the file\n\
+with code at that address.\n\
If SOURCE is provided, dump only that file's symbols.\n\
If OBJFILE is provided, dump only that object file's symbols."),
&maintenanceprintlist);
@@ -1570,8 +1572,8 @@ This does not include information about individual partial symbols,\n\
just the symbol table structures themselves."),
&maintenanceinfolist);
- add_cmd ("check-psymtabs", class_maintenance, maintenance_check_psymtabs,
+ add_cmd ("psymtabs", class_maintenance, maintenance_check_psymtabs,
_("\
Check consistency of currently expanded psymtabs versus symtabs."),
- &maintenancelist);
+ &maintenancechecklist);
}