diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2018-09-09 17:17:05 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2019-02-27 16:54:43 +0200 |
commit | 8010f576414759bf5bdcfeaa64226bf03586b763 (patch) | |
tree | c0f07c3fe031227ca0d3b76b1d45941cb2d7e6b5 /gdb/cris-tdep.c | |
parent | b56bf084434de08080875134e983f8b46eb2328f (diff) | |
download | gdb-8010f576414759bf5bdcfeaa64226bf03586b763.zip gdb-8010f576414759bf5bdcfeaa64226bf03586b763.tar.gz gdb-8010f576414759bf5bdcfeaa64226bf03586b763.tar.bz2 |
gdb/cris: 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:
* gdb/cris-tdep.c (cris_dummy_id): Delete.
(cris_unwind_pc): Delete.
(cris_unwind_sp): Delete.
(cris_gdbarch_init): Don't register deleted functions with
gdbarch.
Diffstat (limited to 'gdb/cris-tdep.c')
-rw-r--r-- | gdb/cris-tdep.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 48bdcac..8eda058 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -651,12 +651,6 @@ static CORE_ADDR crisv32_scan_prologue (CORE_ADDR pc, struct frame_info *this_frame, struct cris_unwind_cache *info); -static CORE_ADDR cris_unwind_pc (struct gdbarch *gdbarch, - struct frame_info *next_frame); - -static CORE_ADDR cris_unwind_sp (struct gdbarch *gdbarch, - struct frame_info *next_frame); - /* When arguments must be pushed onto the stack, they go on in reverse order. The below implements a FILO (stack) to do this. Copied from d10v-tdep.c. */ @@ -767,18 +761,6 @@ cris_frame_prev_register (struct frame_info *this_frame, return trad_frame_get_prev_register (this_frame, info->saved_regs, regnum); } -/* Assuming THIS_FRAME is a dummy, return the frame ID of that dummy - frame. The frame ID's base needs to match the TOS value saved by - save_dummy_frame_tos(), and the PC match the dummy frame's breakpoint. */ - -static struct frame_id -cris_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame) -{ - CORE_ADDR sp; - sp = get_frame_register_unsigned (this_frame, gdbarch_sp_regnum (gdbarch)); - return frame_id_build (sp, get_frame_pc (this_frame)); -} - static CORE_ADDR cris_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp) { @@ -1372,24 +1354,6 @@ cris_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) return pc_after_prologue; } -static CORE_ADDR -cris_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - ULONGEST pc; - pc = frame_unwind_register_unsigned (next_frame, - gdbarch_pc_regnum (gdbarch)); - return pc; -} - -static CORE_ADDR -cris_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame) -{ - ULONGEST sp; - sp = frame_unwind_register_unsigned (next_frame, - gdbarch_sp_regnum (gdbarch)); - return sp; -} - /* Implement the breakpoint_kind_from_pc gdbarch method. */ static int @@ -4095,10 +4059,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_breakpoint_kind_from_pc (gdbarch, cris_breakpoint_kind_from_pc); set_gdbarch_sw_breakpoint_from_kind (gdbarch, cris_sw_breakpoint_from_kind); - set_gdbarch_unwind_pc (gdbarch, cris_unwind_pc); - set_gdbarch_unwind_sp (gdbarch, cris_unwind_sp); - set_gdbarch_dummy_id (gdbarch, cris_dummy_id); - if (tdep->cris_dwarf2_cfi == 1) { /* Hook in the Dwarf-2 frame sniffer. */ |