/* Parser for linespec for the GNU debugger, GDB.
- Copyright (C) 1986-2019 Free Software Foundation, Inc.
+ Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GDB.
if (objfile->sf)
objfile->sf->qf->expand_symtabs_matching (objfile,
NULL,
- lookup_name,
+ &lookup_name,
NULL, NULL,
search_domain);
if (MSYMBOL_TYPE (elem.minsym) == mst_data_gnu_ifunc)
{
struct gdbarch *gdbarch
- = get_objfile_arch (elem.objfile);
+ = elem.objfile->arch ();
msym_addr
= (gdbarch_convert_from_func_ptr_addr
(gdbarch,
because we collect data across the program space before deciding
what to do. */
last_result_len = 0;
- unsigned int ix = 0;
for (const auto &elt : *sym_classes)
{
struct type *t;
struct program_space *pspace;
struct symbol *sym = elt.symbol;
+ unsigned int ix = &elt - &*sym_classes->begin ();
/* Program spaces that are executing startup should have
been filtered out earlier. */
gdb_assert (!pspace->executing_startup);
set_current_program_space (pspace);
t = check_typedef (SYMBOL_TYPE (sym));
- find_methods (t, SYMBOL_LANGUAGE (sym),
+ find_methods (t, sym->language (),
method_name, &result_names, &superclass_vec);
/* Handle all items from a single program space at once; and be
this program space, consider superclasses. */
if (result_names.size () == last_result_len)
find_superclass_methods (std::move (superclass_vec), method_name,
- SYMBOL_LANGUAGE (sym), &result_names);
+ sym->language (), &result_names);
/* We have a list of candidate symbol names, so now we
iterate over the symbol tables looking for all
superclass_vec.clear ();
last_result_len = result_names.size ();
- ++ix;
}
}
ALL_BLOCK_SYMBOLS (block, iter, sym)
{
- if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
+ if (symbol_matches_domain (sym->language (),
SYMBOL_DOMAIN (sym), LABEL_DOMAIN)
&& cmp (sym->search_name (), name, name_len) == 0)
{