gdb: remove TYPE_GNU_IFUNC
gdb/ChangeLog: * gdbtypes.h (TYPE_GNU_IFUNC): Remove, replace all uses with type::is_gnu_ifunc. Change-Id: I72aae22599b5e582910c5d50588feaf159032bd8
This commit is contained in:
parent
03cc72491b
commit
0becda7a5a
6 changed files with 17 additions and 14 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2020-09-14 Simon Marchi <simon.marchi@efficios.com>
|
||||||
|
|
||||||
* gdbtypes.h (struct type) <is_gnu_ifunc, set_is_gnu_ifunc>: New methods.
|
* gdbtypes.h (struct type) <is_gnu_ifunc, set_is_gnu_ifunc>: New methods.
|
||||||
|
|
|
@ -94,7 +94,7 @@ convert_one_symbol (compile_c_instance *context,
|
||||||
case LOC_BLOCK:
|
case LOC_BLOCK:
|
||||||
kind = GCC_C_SYMBOL_FUNCTION;
|
kind = GCC_C_SYMBOL_FUNCTION;
|
||||||
addr = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym.symbol));
|
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);
|
addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -405,7 +405,7 @@ gcc_symbol_address (void *datum, struct gcc_c_context *gcc_context,
|
||||||
"gcc_symbol_address \"%s\": full symbol\n",
|
"gcc_symbol_address \"%s\": full symbol\n",
|
||||||
identifier);
|
identifier);
|
||||||
result = BLOCK_ENTRY_PC (SYMBOL_BLOCK_VALUE (sym));
|
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);
|
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ convert_one_symbol (compile_cplus_instance *instance,
|
||||||
{
|
{
|
||||||
kind = GCC_CP_SYMBOL_FUNCTION;
|
kind = GCC_CP_SYMBOL_FUNCTION;
|
||||||
addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym.symbol));
|
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);
|
addr = gnu_ifunc_resolve_addr (target_gdbarch (), addr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -442,7 +442,7 @@ gcc_cplus_symbol_address (void *datum, struct gcc_cp_context *gcc_context,
|
||||||
"gcc_symbol_address \"%s\": full symbol\n",
|
"gcc_symbol_address \"%s\": full symbol\n",
|
||||||
identifier);
|
identifier);
|
||||||
result = BLOCK_START (SYMBOL_BLOCK_VALUE (sym));
|
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);
|
result = gnu_ifunc_resolve_addr (target_gdbarch (), result);
|
||||||
found = 1;
|
found = 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -735,7 +735,7 @@ evaluate_var_msym_value (enum noside noside,
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
type *the_type = find_minsym_type_and_address (msymbol, objfile, &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);
|
return value_zero (the_type, not_lval);
|
||||||
else
|
else
|
||||||
return value_at_lazy (the_type, address);
|
return value_at_lazy (the_type, address);
|
||||||
|
@ -793,7 +793,7 @@ eval_call (expression *exp, enum noside noside,
|
||||||
else if (ftype->code () == TYPE_CODE_FUNC
|
else if (ftype->code () == TYPE_CODE_FUNC
|
||||||
|| ftype->code () == TYPE_CODE_METHOD)
|
|| ftype->code () == TYPE_CODE_METHOD)
|
||||||
{
|
{
|
||||||
if (TYPE_GNU_IFUNC (ftype))
|
if (ftype->is_gnu_ifunc ())
|
||||||
{
|
{
|
||||||
CORE_ADDR address = value_address (argvec[0]);
|
CORE_ADDR address = value_address (argvec[0]);
|
||||||
type *resolved_type = find_gnu_ifunc_target_type (address);
|
type *resolved_type = find_gnu_ifunc_target_type (address);
|
||||||
|
|
|
@ -233,13 +233,6 @@ DEF_ENUM_FLAGS_TYPE (enum type_instance_flag_value, type_instance_flags);
|
||||||
|
|
||||||
#define TYPE_NOTTEXT(t) (TYPE_INSTANCE_FLAGS (t) & TYPE_INSTANCE_FLAG_NOTTEXT)
|
#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
|
/* * Type owner. If TYPE_OBJFILE_OWNED is true, the type is owned by
|
||||||
the objfile retrieved as TYPE_OBJFILE. Otherwise, the type is
|
the objfile retrieved as TYPE_OBJFILE. Otherwise, the type is
|
||||||
owned by an architecture; TYPE_OBJFILE is NULL in this case. */
|
owned by an architecture; TYPE_OBJFILE is NULL in this case. */
|
||||||
|
@ -1133,6 +1126,11 @@ struct type
|
||||||
this->main_type->m_flag_stub_supported = stub_is_supported;
|
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
|
bool is_gnu_ifunc () const
|
||||||
{
|
{
|
||||||
return this->main_type->m_flag_gnu_ifunc;
|
return this->main_type->m_flag_gnu_ifunc;
|
||||||
|
|
|
@ -275,7 +275,7 @@ find_function_addr (struct value *function,
|
||||||
if (ftype->code () == TYPE_CODE_FUNC
|
if (ftype->code () == TYPE_CODE_FUNC
|
||||||
|| ftype->code () == TYPE_CODE_METHOD)
|
|| ftype->code () == TYPE_CODE_METHOD)
|
||||||
{
|
{
|
||||||
if (TYPE_GNU_IFUNC (ftype))
|
if (ftype->is_gnu_ifunc ())
|
||||||
{
|
{
|
||||||
CORE_ADDR resolver_addr = funaddr;
|
CORE_ADDR resolver_addr = funaddr;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue