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:
parent
f5abd8f234
commit
5f9c5a63ce
57 changed files with 342 additions and 333 deletions
|
@ -56,7 +56,7 @@ convert_one_symbol (compile_cplus_instance *instance,
|
|||
if (sym.symbol->aclass () == LOC_LABEL)
|
||||
sym_type = 0;
|
||||
else
|
||||
sym_type = instance->convert_type (SYMBOL_TYPE (sym.symbol));
|
||||
sym_type = instance->convert_type (sym.symbol->type ());
|
||||
|
||||
if (sym.symbol->domain () == STRUCT_DOMAIN)
|
||||
{
|
||||
|
@ -73,9 +73,9 @@ convert_one_symbol (compile_cplus_instance *instance,
|
|||
switch (sym.symbol->aclass ())
|
||||
{
|
||||
case LOC_TYPEDEF:
|
||||
if (SYMBOL_TYPE (sym.symbol)->code () == TYPE_CODE_TYPEDEF)
|
||||
if (sym.symbol->type ()->code () == TYPE_CODE_TYPEDEF)
|
||||
kind = GCC_CP_SYMBOL_TYPEDEF;
|
||||
else if (SYMBOL_TYPE (sym.symbol)->code () == TYPE_CODE_NAMESPACE)
|
||||
else if (sym.symbol->type ()->code () == TYPE_CODE_NAMESPACE)
|
||||
return;
|
||||
break;
|
||||
|
||||
|
@ -88,13 +88,13 @@ convert_one_symbol (compile_cplus_instance *instance,
|
|||
{
|
||||
kind = GCC_CP_SYMBOL_FUNCTION;
|
||||
addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym.symbol));
|
||||
if (is_global && SYMBOL_TYPE (sym.symbol)->is_gnu_ifunc ())
|
||||
if (is_global && sym.symbol->type ()->is_gnu_ifunc ())
|
||||
addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
|
||||
}
|
||||
break;
|
||||
|
||||
case LOC_CONST:
|
||||
if (SYMBOL_TYPE (sym.symbol)->code () == TYPE_CODE_ENUM)
|
||||
if (sym.symbol->type ()->code () == TYPE_CODE_ENUM)
|
||||
{
|
||||
/* Already handled by convert_enum. */
|
||||
return;
|
||||
|
@ -190,7 +190,7 @@ convert_one_symbol (compile_cplus_instance *instance,
|
|||
{
|
||||
compile_scope scope
|
||||
= instance->new_scope (sym.symbol->natural_name (),
|
||||
SYMBOL_TYPE (sym.symbol));
|
||||
sym.symbol->type ());
|
||||
if (scope.nested_type () != GCC_TYPE_NONE)
|
||||
{
|
||||
/* We found a symbol for this type that was defined inside
|
||||
|
@ -442,7 +442,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context,
|
|||
"gcc_symbol_address \"%s\": full symbol\n",
|
||||
identifier);
|
||||
result = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
|
||||
if (SYMBOL_TYPE (sym)->is_gnu_ifunc ())
|
||||
if (sym->type ()->is_gnu_ifunc ())
|
||||
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
|
||||
found = 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue