/* Target dependent code for GDB on TI C6x systems.
- Copyright (C) 2010-2018 Free Software Foundation, Inc.
+ Copyright (C) 2010-2020 Free Software Foundation, Inc.
Contributed by Andrew Jenner <andrew@codesourcery.com>
Contributed by Yao Qi <yao@codesourcery.com>
return extract_typed_address (buf, builtin_type (gdbarch)->builtin_func_ptr);
}
-/* This is the implementation of gdbarch method unwind_sp. */
-
-static CORE_ADDR
-tic6x_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- return frame_unwind_register_unsigned (this_frame, TIC6X_SP_REGNUM);
-}
-
-
/* Frame base handling. */
static struct tic6x_unwind_cache*
if (type != NULL)
{
type = check_typedef (type);
- if (language_pass_by_reference (type))
+ if (!(language_pass_by_reference (type).trivially_copyable))
return RETURN_VALUE_STRUCT_CONVENTION;
}
}
return RETURN_VALUE_REGISTER_CONVENTION;
}
-/* This is the implementation of gdbarch method dummy_id. */
-
-static struct frame_id
-tic6x_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- return frame_id_build
- (get_frame_register_unsigned (this_frame, TIC6X_SP_REGNUM),
- get_frame_pc (this_frame));
-}
-
/* Get the alignment requirement of TYPE. */
static int
tic6x_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
- int struct_return, CORE_ADDR struct_addr)
+ function_call_return_method return_method,
+ CORE_ADDR struct_addr)
{
int argreg = 0;
int argnum;
/* The caller must pass an argument in A3 containing a destination address
for the returned value. The callee returns the object by copying it to
the address in A3. */
- if (struct_return)
+ if (return_method == return_method_struct)
regcache_cooked_write_unsigned (regcache, 3, struct_addr);
/* Determine the type of this function. */
tic6x_sw_breakpoint_from_kind);
set_gdbarch_unwind_pc (gdbarch, tic6x_unwind_pc);
- set_gdbarch_unwind_sp (gdbarch, tic6x_unwind_sp);
/* Unwinding. */
dwarf2_append_unwinders (gdbarch);
set_gdbarch_return_value (gdbarch, tic6x_return_value);
- set_gdbarch_dummy_id (gdbarch, tic6x_dummy_id);
-
/* Enable inferior call support. */
set_gdbarch_push_dummy_call (gdbarch, tic6x_push_dummy_call);