gdb/rx: Use default gdbarch methods where possible
Make use of the default gdbarch methods for gdbarch_dummy_id, gdbarch_unwind_pc, and gdbarch_unwind_sp where possible. I have not tested this change but, by inspecting the code, I believe the default methods are equivalent to the code being deleted. gdb/ChangeLog: * rx-tdep.c (rx_unwind_pc): Delete. (rx_unwind_sp): Delete. (rx_dummy_id): Delete. (rx_gdbarch_init): Don't register deleted functions with gdbarch. Update comment.
This commit is contained in:
parent
833a4480dd
commit
47c47d6907
|
@ -1,3 +1,11 @@
|
|||
2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* rx-tdep.c (rx_unwind_pc): Delete.
|
||||
(rx_unwind_sp): Delete.
|
||||
(rx_dummy_id): Delete.
|
||||
(rx_gdbarch_init): Don't register deleted functions with
|
||||
gdbarch. Update comment.
|
||||
|
||||
2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* rs6000-tdep.c (rs6000_unwind_pc): Delete.
|
||||
|
|
|
@ -751,35 +751,6 @@ static const struct frame_unwind rx_exception_unwind = {
|
|||
rx_exception_sniffer
|
||||
};
|
||||
|
||||
/* Implement the "unwind_pc" gdbarch method. */
|
||||
static CORE_ADDR
|
||||
rx_unwind_pc (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
||||
{
|
||||
ULONGEST pc;
|
||||
|
||||
pc = frame_unwind_register_unsigned (this_frame, RX_PC_REGNUM);
|
||||
return pc;
|
||||
}
|
||||
|
||||
/* Implement the "unwind_sp" gdbarch method. */
|
||||
static CORE_ADDR
|
||||
rx_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
||||
{
|
||||
ULONGEST sp;
|
||||
|
||||
sp = frame_unwind_register_unsigned (this_frame, RX_SP_REGNUM);
|
||||
return sp;
|
||||
}
|
||||
|
||||
/* Implement the "dummy_id" gdbarch method. */
|
||||
static struct frame_id
|
||||
rx_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
||||
{
|
||||
return
|
||||
frame_id_build (get_frame_register_unsigned (this_frame, RX_SP_REGNUM),
|
||||
get_frame_pc (this_frame));
|
||||
}
|
||||
|
||||
/* Implement the "push_dummy_call" gdbarch method. */
|
||||
static CORE_ADDR
|
||||
rx_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
|
@ -1112,9 +1083,6 @@ rx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
set_gdbarch_sw_breakpoint_from_kind (gdbarch, rx_breakpoint::bp_from_kind);
|
||||
set_gdbarch_skip_prologue (gdbarch, rx_skip_prologue);
|
||||
|
||||
set_gdbarch_unwind_pc (gdbarch, rx_unwind_pc);
|
||||
set_gdbarch_unwind_sp (gdbarch, rx_unwind_sp);
|
||||
|
||||
/* Target builtin data types. */
|
||||
set_gdbarch_char_signed (gdbarch, 0);
|
||||
set_gdbarch_short_bit (gdbarch, 16);
|
||||
|
@ -1147,10 +1115,8 @@ rx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
dwarf2_append_unwinders (gdbarch);
|
||||
frame_unwind_append_unwinder (gdbarch, &rx_frame_unwind);
|
||||
|
||||
/* Methods for saving / extracting a dummy frame's ID.
|
||||
The ID's stack address must match the SP value returned by
|
||||
PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos. */
|
||||
set_gdbarch_dummy_id (gdbarch, rx_dummy_id);
|
||||
/* Methods setting up a dummy call, and extracting the return value from
|
||||
a call. */
|
||||
set_gdbarch_push_dummy_call (gdbarch, rx_push_dummy_call);
|
||||
set_gdbarch_return_value (gdbarch, rx_return_value);
|
||||
|
||||
|
|
Loading…
Reference in New Issue