+2019-09-07 Simon Marchi <simon.marchi@efficios.com>
+
+ * 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.
+
2019-09-06 Christian Biesinger <cbiesinger@google.com>
* defs.h (relocate_gdb_directory): Change int to bool in
struct dwarf2_per_objfile *dwarf2_per_objfile;
/* If set, only look for symbols that match that block. Valid values are
GLOBAL_BLOCK and STATIC_BLOCK. */
- gdb::optional<int> block_index;
+ gdb::optional<block_enum> block_index;
/* The kind of symbol we're looking for. */
domain_enum domain;
/* The list of CUs from the index entry of the symbol,
static void
dw2_symtab_iter_init (struct dw2_symtab_iterator *iter,
struct dwarf2_per_objfile *dwarf2_per_objfile,
- gdb::optional<int> block_index,
+ gdb::optional<block_enum> block_index,
domain_enum domain,
const char *name)
{
}
static struct compunit_symtab *
-dw2_lookup_symbol (struct objfile *objfile, int block_index,
+dw2_lookup_symbol (struct objfile *objfile, block_enum block_index,
const char *name, domain_enum domain)
{
struct compunit_symtab *stab_best = NULL;
}
static struct compunit_symtab *
-dw2_debug_names_lookup_symbol (struct objfile *objfile, int block_index_int,
+dw2_debug_names_lookup_symbol (struct objfile *objfile, block_enum block_index,
const char *name, domain_enum domain)
{
- const block_enum block_index = static_cast<block_enum> (block_index_int);
struct dwarf2_per_objfile *dwarf2_per_objfile
= get_dwarf2_per_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);
}
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);
contains !TYPE_OPAQUE symbol prefer its compunit. If it contains
only TYPE_OPAQUE symbol(s), return at least that compunit. */
struct compunit_symtab *(*lookup_symbol) (struct objfile *objfile,
- int block_index, const char *name,
+ block_enum block_index,
+ const char *name,
domain_enum domain);
/* Print statistics about any indices loaded for OBJFILE. The