diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2022-01-27 22:16:41 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2022-02-06 16:03:47 -0500 |
commit | 5f9c5a63ce38b103f778f54394c6a3d43b7ade90 (patch) | |
tree | c356fc03c61b9e9234aa8e187fb6c2303b8e5d2c /gdb/valops.c | |
parent | f5abd8f234426bbe8ccd08c43e6ae7cbe635e042 (diff) | |
download | gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.zip gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.tar.gz gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.tar.bz2 |
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/valops.c')
-rw-r--r-- | gdb/valops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 9767b2c..3a59512 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1387,7 +1387,7 @@ value_of_variable (struct symbol *var, const struct block *b) struct value * address_of_variable (struct symbol *var, const struct block *b) { - struct type *type = SYMBOL_TYPE (var); + struct type *type = var->type (); struct value *val; /* Evaluate it first; if the result is a memory address, we're fine. @@ -2833,7 +2833,7 @@ find_overload_match (gdb::array_view<value *> args, the function part. Do not try this for non-functions (e.g. function pointers). */ if (qualified_name - && (check_typedef (SYMBOL_TYPE (fsym))->code () + && (check_typedef (fsym->type ())->code () == TYPE_CODE_FUNC)) { temp_func = cp_func_name (qualified_name); @@ -3187,14 +3187,14 @@ find_oload_champ (gdb::array_view<value *> args, static_offset = oload_method_static_p (methods, ix); } else - nparms = SYMBOL_TYPE (functions[ix])->num_fields (); + nparms = functions[ix]->type ()->num_fields (); parm_types.reserve (nparms); for (jj = 0; jj < nparms; jj++) { type *t = (methods != NULL ? (TYPE_FN_FIELD_ARGS (methods, ix)[jj].type ()) - : SYMBOL_TYPE (functions[ix])->field (jj).type ()); + : functions[ix]->type ()->field (jj).type ()); parm_types.push_back (t); } } @@ -3780,7 +3780,7 @@ value_maybe_namespace_elt (const struct type *curtype, return NULL; else if ((noside == EVAL_AVOID_SIDE_EFFECTS) && (sym.symbol->aclass () == LOC_TYPEDEF)) - result = allocate_value (SYMBOL_TYPE (sym.symbol)); + result = allocate_value (sym.symbol->type ()); else result = value_of_variable (sym.symbol, sym.block); |