Allow passing a block to lookup_global_symbol_from_objfile

This has no behavior change in itself, but allows a future patch
to add a function to the Python API to look up symbols in the
static block.

gdb/ChangeLog:

2019-07-24  Christian Biesinger  <cbiesinger@google.com>

	* compile/compile-object-load.c (compile_object_load): Pass GLOBAL_SCOPE.
	* solib-spu.c (spu_lookup_lib_symbol): Pass GLOBAL_SCOPE.
	* solib-svr4.c (elf_lookup_lib_symbol): Pass GLOBAL_SCOPE.
	* symtab.c (lookup_global_symbol_from_objfile): Add a scope parameter.
	* symtab.h (lookup_global_symbol_from_objfile): Likewise.
This commit is contained in:
Christian Biesinger 2019-06-25 15:45:41 -05:00
parent 75b493d0f9
commit 442853af24
6 changed files with 23 additions and 5 deletions

View file

@ -639,6 +639,7 @@ compile_object_load (const compile_file_names &file_names,
objfile = objfile_holder.get ();
func_sym = lookup_global_symbol_from_objfile (objfile,
GLOBAL_BLOCK,
GCC_FE_WRAPPER_FUNCTION,
VAR_DOMAIN).symbol;
if (func_sym == NULL)