mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-06 07:33:08 +00:00
Convert lookup_symbol_in_objfile
This converts lookup_symbol_in_objfile to the callback approach by removing the call to lookup_symbol_in_objfile_symtabs. (The latter is not removed as there are still other callers.) Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16994 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=16998 Acked-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
16
gdb/symtab.c
16
gdb/symtab.c
@@ -2586,24 +2586,12 @@ lookup_symbol_in_objfile (struct objfile *objfile, enum block_enum block_index,
|
|||||||
? "GLOBAL_BLOCK" : "STATIC_BLOCK",
|
? "GLOBAL_BLOCK" : "STATIC_BLOCK",
|
||||||
name, domain_name (domain).c_str ());
|
name, domain_name (domain).c_str ());
|
||||||
|
|
||||||
result = lookup_symbol_in_objfile_symtabs (objfile, block_index,
|
|
||||||
name, domain);
|
|
||||||
if (result.symbol != NULL)
|
|
||||||
{
|
|
||||||
symbol_lookup_debug_printf
|
|
||||||
("lookup_symbol_in_objfile (...) = %s (in symtabs)",
|
|
||||||
host_address_to_string (result.symbol));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
result = lookup_symbol_via_quick_fns (objfile, block_index,
|
result = lookup_symbol_via_quick_fns (objfile, block_index,
|
||||||
name, domain);
|
name, domain);
|
||||||
symbol_lookup_debug_printf ("lookup_symbol_in_objfile (...) = %s%s",
|
symbol_lookup_debug_printf ("lookup_symbol_in_objfile (...) = %s",
|
||||||
result.symbol != NULL
|
result.symbol != NULL
|
||||||
? host_address_to_string (result.symbol)
|
? host_address_to_string (result.symbol)
|
||||||
: "NULL",
|
: "NULL");
|
||||||
result.symbol != NULL ? " (via quick fns)"
|
|
||||||
: "");
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user