From c7f839cbf08c397f3ab208054f11cfc1236ee143 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Sat, 7 Sep 2019 12:03:56 -0400 Subject: 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) : Change type to gdb::optional. (dw2_symtab_iter_init): Change block_index parameter type to gdb::optional. (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) : Likewise. --- gdb/symfile-debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/symfile-debug.c') diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c index 0f9da66..c5b565f 100644 --- a/gdb/symfile-debug.c +++ b/gdb/symfile-debug.c @@ -140,8 +140,8 @@ debug_qf_map_symtabs_matching_filename } static struct compunit_symtab * -debug_qf_lookup_symbol (struct objfile *objfile, int kind, const char *name, - domain_enum domain) +debug_qf_lookup_symbol (struct objfile *objfile, block_enum kind, + const char *name, domain_enum domain) { const struct debug_sym_fns_data *debug_data = symfile_debug_objfile_data_key.get (objfile); -- cgit v1.1