aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-01-10 20:17:00 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-04-23 22:50:29 +0100
commit6d14d64dfefef524398f45fd59c1443ebac624f6 (patch)
treeed3ef9ec2751d2ed9a4b433ccb1178cade8efce8 /gdb/sh-tdep.c
parenta40dde9db56ffcea8c2b99e8c4e292ce64f64f9c (diff)
downloadgdb-6d14d64dfefef524398f45fd59c1443ebac624f6.zip
gdb-6d14d64dfefef524398f45fd59c1443ebac624f6.tar.gz
gdb-6d14d64dfefef524398f45fd59c1443ebac624f6.tar.bz2
gdb/sh: 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: * sh-tdep.c (sh_unwind_sp): Delete. (sh_unwind_pc): Delete. (sh_dummy_id): Delete. (sh_gdbarch_init): Don't register deleted functions with gdbarch.
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index de53dcd..8337a07 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -1977,28 +1977,6 @@ static const struct frame_unwind sh_frame_unwind = {
};
static CORE_ADDR
-sh_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame,
- gdbarch_sp_regnum (gdbarch));
-}
-
-static CORE_ADDR
-sh_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame,
- gdbarch_pc_regnum (gdbarch));
-}
-
-static struct frame_id
-sh_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- CORE_ADDR sp = get_frame_register_unsigned (this_frame,
- gdbarch_sp_regnum (gdbarch));
- return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
-static CORE_ADDR
sh_frame_base_address (struct frame_info *this_frame, void **this_cache)
{
struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
@@ -2308,9 +2286,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_frame_align (gdbarch, sh_frame_align);
- set_gdbarch_unwind_sp (gdbarch, sh_unwind_sp);
- set_gdbarch_unwind_pc (gdbarch, sh_unwind_pc);
- set_gdbarch_dummy_id (gdbarch, sh_dummy_id);
frame_base_set_default (gdbarch, &sh_frame_base);
set_gdbarch_stack_frame_destroyed_p (gdbarch, sh_stack_frame_destroyed_p);