aboutsummaryrefslogtreecommitdiff
path: root/gdb/linespec.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2021-11-21 22:26:24 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-02-06 16:03:46 -0500
commit66d7f48f8045adf266046df7ceb84161d5678cfa (patch)
tree473af71237afd358293f506901cdb13372d8dd72 /gdb/linespec.c
parentd1eebf9a6f02786eb0d5f6b961b8d692d23e77b1 (diff)
downloadgdb-66d7f48f8045adf266046df7ceb84161d5678cfa.zip
gdb-66d7f48f8045adf266046df7ceb84161d5678cfa.tar.gz
gdb-66d7f48f8045adf266046df7ceb84161d5678cfa.tar.bz2
gdb: remove SYMBOL_CLASS macro, add getter
Change-Id: I83211d5a47efc0564386e5b5ea4a29c00b1fd46a
Diffstat (limited to 'gdb/linespec.c')
-rw-r--r--gdb/linespec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/linespec.c b/gdb/linespec.c
index bacf343..0a930e1 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -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);