aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2019-09-07 12:03:56 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2019-09-07 12:06:01 -0400
commitc7f839cbf08c397f3ab208054f11cfc1236ee143 (patch)
treec3d4a9aace481dca628fcf8d9826869f0ae36715 /gdb/psymtab.c
parentdeccd150e1e91c3a0f0557cdeaf95bb816c4af8e (diff)
downloadgdb-c7f839cbf08c397f3ab208054f11cfc1236ee143.zip
gdb-c7f839cbf08c397f3ab208054f11cfc1236ee143.tar.gz
gdb-c7f839cbf08c397f3ab208054f11cfc1236ee143.tar.bz2
Change lookup_symbol's block_index parameter type to block_enum
The only two values valid to pass to the block_index parameter of quick_symbol_functions::lookup_symbol are GLOBAL_BLOCK and STATIC_BLOCK, part of enum block_enum. Change the type of that parameter to block_enum. Change also the block_index field of dw2_symtab_iterator in the same way.. This makes it consistent with dw2_debug_names_iterator, which already uses block_enum for its block_index field. This is a follow-up to this thread: https://sourceware.org/ml/gdb-patches/2019-08/msg00097.html gdb/ChangeLog: * dwarf2read.c (struct dw2_symtab_iterator) <block_index>: Change type to gdb::optional<block_enum>. (dw2_symtab_iter_init): Change block_index parameter type to gdb::optional<block_enum>. (dw2_lookup_symbol): Change block_index parameter type to block_enum.c (dw2_debug_names_lookup_symbol): Likewise. * psymtab.c (psym_lookup_symbol): Likewise. * symfile-debug.c (debug_qf_lookup_symbol): Likewise. * symfile.h (struct quick_symbol_functions) <lookup_symbol>: Likewise.
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 6f9bf72..70d04f8 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -479,7 +479,7 @@ find_pc_sect_psymbol (struct objfile *objfile,
static struct compunit_symtab *
psym_lookup_symbol (struct objfile *objfile,
- int block_index, const char *name,
+ block_enum block_index, const char *name,
const domain_enum domain)
{
const int psymtab_index = (block_index == GLOBAL_BLOCK ? 1 : 0);