summaryrefslogtreecommitdiff
path: root/gdb/ada-exp.y
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2022-01-27 22:16:41 -0500
committerSimon Marchi <simon.marchi@efficios.com>2022-02-06 16:03:47 -0500
commit5f9c5a63ce38b103f778f54394c6a3d43b7ade90 (patch)
treec356fc03c61b9e9234aa8e187fb6c2303b8e5d2c /gdb/ada-exp.y
parentf5abd8f234426bbe8ccd08c43e6ae7cbe635e042 (diff)
downloadbinutils-gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.tar.gz
gdb: remove SYMBOL_TYPE macro
Add a getter and a setter for a symbol's type. Remove the corresponding macro and adjust all callers. Change-Id: Ie1a137744c5bfe1df4d4f9ae5541c5299577c8de
Diffstat (limited to 'gdb/ada-exp.y')
-rw-r--r--gdb/ada-exp.y10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 0cb4aac10e3..916b8ef94fe 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -1332,10 +1332,10 @@ select_possible_type_sym (const std::vector<struct block_symbol> &syms)
switch (syms[i].symbol->aclass ())
{
case LOC_TYPEDEF:
- if (ada_prefer_type (SYMBOL_TYPE (syms[i].symbol), preferred_type))
+ if (ada_prefer_type (syms[i].symbol->type (), preferred_type))
{
preferred_index = i;
- preferred_type = SYMBOL_TYPE (syms[i].symbol);
+ preferred_type = syms[i].symbol->type ();
}
break;
case LOC_REGISTER:
@@ -1374,7 +1374,7 @@ find_primitive_type (struct parser_state *par_state, const char *name)
strcat (expanded_name, name);
sym = ada_lookup_symbol (expanded_name, NULL, VAR_DOMAIN).symbol;
if (sym != NULL && sym->aclass () == LOC_TYPEDEF)
- type = SYMBOL_TYPE (sym);
+ type = sym->type ();
}
return type;
@@ -1474,7 +1474,7 @@ get_symbol_field_type (struct symbol *sym, const char *encoded_field_name)
{
const char *field_name = encoded_field_name;
const char *subfield_name;
- struct type *type = SYMBOL_TYPE (sym);
+ struct type *type = sym->type ();
int fieldno;
if (type == NULL || field_name == NULL)
@@ -1595,7 +1595,7 @@ write_var_or_type (struct parser_state *par_state,
struct type *field_type;
if (tail_index == name_len)
- return SYMBOL_TYPE (type_sym);
+ return type_sym->type ();
/* We have some extraneous characters after the type name.
If this is an expression "TYPE_NAME.FIELD0.[...].FIELDN",