aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-namespace.c
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/cp-namespace.c
parentf5abd8f234426bbe8ccd08c43e6ae7cbe635e042 (diff)
downloadfsf-binutils-gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.zip
fsf-binutils-gdb-5f9c5a63ce38b103f778f54394c6a3d43b7ade90.tar.gz
fsf-binutils-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/cp-namespace.c')
-rw-r--r--gdb/cp-namespace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/cp-namespace.c b/gdb/cp-namespace.c
index 8fb2f71..18238db 100644
--- a/gdb/cp-namespace.c
+++ b/gdb/cp-namespace.c
@@ -220,7 +220,7 @@ cp_lookup_bare_symbol (const struct language_defn *langdef,
return {};
- type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this.symbol)));
+ type = check_typedef (TYPE_TARGET_TYPE (lang_this.symbol->type ()));
/* If TYPE_NAME is NULL, abandon trying to find this symbol.
This can happen for lambda functions compiled with clang++,
which outputs no name for the container class. */
@@ -274,7 +274,7 @@ cp_search_static_and_baseclasses (const char *name,
if (scope_sym.symbol == NULL)
return {};
- struct type *scope_type = SYMBOL_TYPE (scope_sym.symbol);
+ struct type *scope_type = scope_sym.symbol->type ();
/* If the scope is a function/method, then look up NESTED as a local
static variable. E.g., "print 'function()::static_var'". */