/* Target-dependent code for the S+core architecture, for GDB,
the GNU Debugger.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
Contributed by Qinwei (qinwei@sunnorth.com.cn)
Contributed by Ching-Peng Lin (cplin@sunplus.com)
return builtin_type (gdbarch)->builtin_uint32;
}
-static CORE_ADDR
-score_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, SCORE_SP_REGNUM);
-}
-
-static CORE_ADDR
-score_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, SCORE_PC_REGNUM);
-}
-
static const char *
score7_register_name (struct gdbarch *gdbarch, int regnum)
{
}
}
-static struct frame_id
-score_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- return frame_id_build (get_frame_register_unsigned (this_frame,
- SCORE_SP_REGNUM),
- get_frame_pc (this_frame));
-}
-
static int
score_type_needs_double_align (struct type *type)
{
inst_t *inst = NULL;
if (memblock != NULL)
{
- /* Reading memory block from target succefully and got all
+ /* Reading memory block from target successfully and got all
the instructions(from STARTADDR to PC) needed. */
score7_adjust_memblock_ptr (&memblock, prev_pc, cur_pc);
inst = score7_fetch_inst (gdbarch, cur_pc, memblock);
&& G_FLD (inst->v, 2, 0) == 0x0)
{
/* subei! r0, n */
- sp_offset += (int) pow (2, G_FLD (inst->v, 6, 3));
+ sp_offset += (int) pow (2.0, G_FLD (inst->v, 6, 3));
}
else if (G_FLD (inst->v, 14, 7) == 0xc0
&& G_FLD (inst->v, 2, 0) == 0x0)
{
/* addei! r0, n */
- sp_offset -= (int) pow (2, G_FLD (inst->v, 6, 3));
+ /* Solaris 11+gcc 5.5 has ambiguous overloads of pow, so we
+ pass 2.0 instead of 2 to get the right one. */
+ sp_offset -= (int) pow (2.0, G_FLD (inst->v, 6, 3));
}
}
else
set_gdbarch_register_type (gdbarch, score_register_type);
set_gdbarch_frame_align (gdbarch, score_frame_align);
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
- set_gdbarch_unwind_sp (gdbarch, score_unwind_sp);
- set_gdbarch_unwind_pc (gdbarch, score_unwind_pc);
switch (target_mach)
{
/* Dummy frame hooks. */
set_gdbarch_return_value (gdbarch, score_return_value);
set_gdbarch_call_dummy_location (gdbarch, AT_ENTRY_POINT);
- set_gdbarch_dummy_id (gdbarch, score_dummy_id);
set_gdbarch_push_dummy_call (gdbarch, score_push_dummy_call);
/* Normal frame hooks. */