aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorChristian Biesinger <cbiesinger@google.com>2019-06-25 15:45:41 -0500
committerChristian Biesinger <cbiesinger@google.com>2019-07-24 19:02:50 -0500
commit442853af244e0352956a5d91ad5e169a85b58710 (patch)
tree96e61428ae50146e38826671e4c25becf679c298 /gdb/symtab.h
parent75b493d0f95c6037753e0d250e1ecc6fe8d46c38 (diff)
downloadgdb-442853af244e0352956a5d91ad5e169a85b58710.zip
gdb-442853af244e0352956a5d91ad5e169a85b58710.tar.gz
gdb-442853af244e0352956a5d91ad5e169a85b58710.tar.bz2
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.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index b91454c..9880ecc 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -2045,13 +2045,16 @@ extern bool treg_matches_sym_type_name (const compiled_regex &treg,
extern const char *main_name ();
extern enum language main_language (void);
-/* Lookup symbol NAME from DOMAIN in MAIN_OBJFILE's global blocks.
+/* Lookup symbol NAME from DOMAIN in MAIN_OBJFILE's global or static blocks,
+ as specified by BLOCK_INDEX.
This searches MAIN_OBJFILE as well as any associated separate debug info
objfiles of MAIN_OBJFILE.
+ BLOCK_INDEX can be GLOBAL_BLOCK or STATIC_BLOCK.
Upon success fixes up the symbol's section if necessary. */
extern struct block_symbol
lookup_global_symbol_from_objfile (struct objfile *main_objfile,
+ enum block_enum block_index,
const char *name,
const domain_enum domain);