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
This commit is contained in:
Simon Marchi
2022-01-27 22:16:41 -05:00
parent f5abd8f234
commit 5f9c5a63ce
57 changed files with 342 additions and 333 deletions

View File

@ -166,7 +166,7 @@ inspect_type (struct demangle_parse_info *info,
if (sym != NULL)
{
struct type *otype = SYMBOL_TYPE (sym);
struct type *otype = sym->type ();
if (finder != NULL)
{
@ -512,7 +512,7 @@ replace_typedefs (struct demangle_parse_info *info,
if (sym != NULL)
{
struct type *otype = SYMBOL_TYPE (sym);
struct type *otype = sym->type ();
const char *new_name = (*finder) (otype, data);
if (new_name != NULL)
@ -1215,7 +1215,7 @@ overload_list_add_symbol (struct symbol *sym,
{
/* If there is no type information, we can't do anything, so
skip. */
if (SYMBOL_TYPE (sym) == NULL)
if (sym->type () == NULL)
return;
/* skip any symbols that we've already considered. */
@ -1507,7 +1507,7 @@ cp_lookup_rtti_type (const char *name, const struct block *block)
return NULL;
}
rtti_type = check_typedef (SYMBOL_TYPE (rtti_sym));
rtti_type = check_typedef (rtti_sym->type ());
switch (rtti_type->code ())
{