From 5f9c5a63ce38b103f778f54394c6a3d43b7ade90 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 27 Jan 2022 22:16:41 -0500 Subject: 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 --- gdb/cp-namespace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/cp-namespace.c') 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'". */ -- cgit v1.1