+2020-09-14 Simon Marchi <simon.marchi@efficios.com>
+
+ * gdbtypes.h (TYPE_GNU_IFUNC): Remove, replace all
+ uses with type::is_gnu_ifunc.
+
2020-09-14 Simon Marchi <simon.marchi@efficios.com>
* gdbtypes.h (struct type) <is_gnu_ifunc, set_is_gnu_ifunc>: New methods.
case LOC_BLOCK:
kind = GCC_C_SYMBOL_FUNCTION;
addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym.symbol));
- if (is_global && TYPE_GNU_IFUNC (SYMBOL_TYPE (sym.symbol)))
+ if (is_global && SYMBOL_TYPE (sym.symbol)->is_gnu_ifunc ())
addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
break;
"gcc_symbol_address \"%s\": full symbol\n",
identifier);
result = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
- if (TYPE_GNU_IFUNC (SYMBOL_TYPE (sym)))
+ if (SYMBOL_TYPE (sym)->is_gnu_ifunc ())
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
found = 1;
}
{
kind = GCC_CP_SYMBOL_FUNCTION;
addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym.symbol));
- if (is_global && TYPE_GNU_IFUNC (SYMBOL_TYPE (sym.symbol)))
+ if (is_global && SYMBOL_TYPE (sym.symbol)->is_gnu_ifunc ())
addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
}
break;
"gcc_symbol_address \"%s\": full symbol\n",
identifier);
result = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
- if (TYPE_GNU_IFUNC (SYMBOL_TYPE (sym)))
+ if (SYMBOL_TYPE (sym)->is_gnu_ifunc ())
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
found = 1;
}
CORE_ADDR address;
type *the_type = find_minsym_type_and_address (msymbol, objfile, &address);
- if (noside == EVAL_AVOID_SIDE_EFFECTS && !TYPE_GNU_IFUNC (the_type))
+ if (noside == EVAL_AVOID_SIDE_EFFECTS && !the_type->is_gnu_ifunc ())
return value_zero (the_type, not_lval);
else
return value_at_lazy (the_type, address);
else if (ftype->code () == TYPE_CODE_FUNC
|| ftype->code () == TYPE_CODE_METHOD)
{
- if (TYPE_GNU_IFUNC (ftype))
+ if (ftype->is_gnu_ifunc ())
{
CORE_ADDR address = value_address (argvec[0]);
type *resolved_type = find_gnu_ifunc_target_type (address);
#define TYPE_NOTTEXT(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_NOTTEXT)
-/* * Used only for TYPE_CODE_FUNC where it specifies the real function
- address is returned by this function call. TYPE_TARGET_TYPE
- determines the final returned function type to be presented to
- user. */
-
-#define TYPE_GNU_IFUNC(t) ((t)->is_gnu_ifunc ())
-
/* * Type owner. If TYPE_OBJFILE_OWNED is true, the type is owned by
the objfile retrieved as TYPE_OBJFILE. Otherwise, the type is
owned by an architecture; TYPE_OBJFILE is NULL in this case. */
this->main_type->m_flag_stub_supported = stub_is_supported;
}
+ /* Used only for TYPE_CODE_FUNC where it specifies the real function
+ address is returned by this function call. TYPE_TARGET_TYPE
+ determines the final returned function type to be presented to
+ user. */
+
bool is_gnu_ifunc () const
{
return this->main_type->m_flag_gnu_ifunc;
if (ftype->code () == TYPE_CODE_FUNC
|| ftype->code () == TYPE_CODE_METHOD)
{
- if (TYPE_GNU_IFUNC (ftype))
+ if (ftype->is_gnu_ifunc ())
{
CORE_ADDR resolver_addr = funaddr;