gdb: remove SYMBOL_CLASS macro, add getter

Change-Id: I83211d5a47efc0564386e5b5ea4a29c00b1fd46a
This commit is contained in:
Simon Marchi 2021-11-21 22:26:24 -05:00
parent d1eebf9a6f
commit 66d7f48f80
42 changed files with 147 additions and 144 deletions

View file

@ -204,7 +204,7 @@ collect_info::add_symbol (block_symbol *bsym)
{
/* In list mode, add all matching symbols, regardless of class.
This allows the user to type "list a_global_variable". */
if (SYMBOL_CLASS (bsym->symbol) == LOC_BLOCK || this->state->list_mode)
if (bsym->symbol->aclass () == LOC_BLOCK || this->state->list_mode)
this->result.symbols->push_back (*bsym);
/* Continue iterating. */
@ -2298,7 +2298,7 @@ convert_linespec_to_sals (struct linespec_state *state, linespec *ls)
if (state->funfirstline
&& !ls->minimal_symbols.empty ()
&& SYMBOL_CLASS (sym.symbol) == LOC_BLOCK)
&& sym.symbol->aclass () == LOC_BLOCK)
{
const CORE_ADDR addr
= BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym.symbol));
@ -3491,7 +3491,7 @@ decode_compound_collector::operator () (block_symbol *bsym)
struct type *t;
struct symbol *sym = bsym->symbol;
if (SYMBOL_CLASS (sym) != LOC_TYPEDEF)
if (sym->aclass () != LOC_TYPEDEF)
return true; /* Continue iterating. */
t = SYMBOL_TYPE (sym);
@ -4439,14 +4439,14 @@ static int
symbol_to_sal (struct symtab_and_line *result,
int funfirstline, struct symbol *sym)
{
if (SYMBOL_CLASS (sym) == LOC_BLOCK)
if (sym->aclass () == LOC_BLOCK)
{
*result = find_function_start_sal (sym, funfirstline);
return 1;
}
else
{
if (SYMBOL_CLASS (sym) == LOC_LABEL && SYMBOL_VALUE_ADDRESS (sym) != 0)
if (sym->aclass () == LOC_LABEL && SYMBOL_VALUE_ADDRESS (sym) != 0)
{
*result = {};
result->symtab = symbol_symtab (sym);