TYPE_STUB_SUPPORTED (type) = 1;
if (flags & TYPE_FLAG_FIXED_INSTANCE)
TYPE_FIXED_INSTANCE (type) = 1;
+ if (flags & TYPE_FLAG_GNU_IFUNC)
+ TYPE_GNU_IFUNC (type) = 1;
if (name)
TYPE_NAME (type) = obsavestring (name, strlen (name),
static int
is_unique_ancestor_worker (struct type *base, struct type *dclass,
int *offset,
- const bfd_byte *contents, CORE_ADDR address)
+ const gdb_byte *valaddr, int embedded_offset,
+ CORE_ADDR address, struct value *val)
{
int i, count = 0;
for (i = 0; i < TYPE_N_BASECLASSES (dclass) && count < 2; ++i)
{
- struct type *iter = check_typedef (TYPE_BASECLASS (dclass, i));
- int this_offset = baseclass_offset (dclass, i, contents, address);
+ struct type *iter;
+ int this_offset;
- if (this_offset == -1)
- error (_("virtual baseclass botch"));
+ iter = check_typedef (TYPE_BASECLASS (dclass, i));
+
+ this_offset = baseclass_offset (dclass, i, valaddr, embedded_offset,
+ address, val);
if (class_types_same_p (base, iter))
{
}
else
count += is_unique_ancestor_worker (base, iter, offset,
- contents + this_offset,
- address + this_offset);
+ valaddr,
+ embedded_offset + this_offset,
+ address, val);
}
return count;
int offset = -1;
return is_unique_ancestor_worker (base, value_type (val), &offset,
- value_contents (val),
- value_address (val)) == 1;
+ value_contents_for_printing (val),
+ value_embedded_offset (val),
+ value_address (val), val) == 1;
}
\f
= lookup_pointer_type (builtin_type->builtin_void);
builtin_type->builtin_func_ptr
= lookup_pointer_type (lookup_function_type (builtin_type->builtin_void));
+ builtin_type->builtin_func_func
+ = lookup_function_type (builtin_type->builtin_func_ptr);
/* This type represents a GDB internal function. */
builtin_type->internal_fn
"<text variable, no debug info>", objfile);
TYPE_TARGET_TYPE (objfile_type->nodebug_text_symbol)
= objfile_type->builtin_int;
+ objfile_type->nodebug_text_gnu_ifunc_symbol
+ = init_type (TYPE_CODE_FUNC, 1, TYPE_FLAG_GNU_IFUNC,
+ "<text gnu-indirect-function variable, no debug info>",
+ objfile);
+ TYPE_TARGET_TYPE (objfile_type->nodebug_text_gnu_ifunc_symbol)
+ = objfile_type->nodebug_text_symbol;
+ objfile_type->nodebug_got_plt_symbol
+ = init_type (TYPE_CODE_PTR, gdbarch_addr_bit (gdbarch) / 8, 0,
+ "<text from jump slot in .got.plt, no debug info>",
+ objfile);
+ TYPE_TARGET_TYPE (objfile_type->nodebug_got_plt_symbol)
+ = objfile_type->nodebug_text_symbol;
objfile_type->nodebug_data_symbol
= init_type (TYPE_CODE_INT,
gdbarch_int_bit (gdbarch) / HOST_CHAR_BIT, 0,