aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2018-12-27 11:52:53 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-02-27 16:54:44 +0200
commit9734a586671fa95a06a2e10323c14d0157805057 (patch)
treebf3e690285d124cb995d1fcd7f51d3d0d0a1cdc7 /gdb
parent68b867f30eeca7e9585e9ee16e824f5a18e2bc6c (diff)
downloadgdb-9734a586671fa95a06a2e10323c14d0157805057.zip
gdb-9734a586671fa95a06a2e10323c14d0157805057.tar.gz
gdb-9734a586671fa95a06a2e10323c14d0157805057.tar.bz2
gdb/h8300: 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/h8300-tdep.c (h8300_unwind_pc): Delete. (h8300_unwind_sp): Delete. (h8300_dummy_id): Delete. (h8300_gdbarch_init): Don't register deleted functions with gdbarch.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/h8300-tdep.c22
2 files changed, 8 insertions, 22 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ba87706..a4a1f21 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2019-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb/h8300-tdep.c (h8300_unwind_pc): Delete.
+ (h8300_unwind_sp): Delete.
+ (h8300_dummy_id): Delete.
+ (h8300_gdbarch_init): Don't register deleted functions with
+ gdbarch.
+
+2019-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb/ft32-tdep.c (ft32_dummy_id): Delete.
(ft32_unwind_pc): Delete.
(ft32_unwind_sp): Delete.
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index f0db416..b41a0b6 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -92,25 +92,6 @@ static int is_h8300_normal_mode (struct gdbarch *gdbarch);
&& !is_h8300_normal_mode (gdbarch)) \
? h8300h_reg_size : h8300_reg_size)
-static CORE_ADDR
-h8300_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, E_PC_REGNUM);
-}
-
-static CORE_ADDR
-h8300_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, E_SP_REGNUM);
-}
-
-static struct frame_id
-h8300_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- CORE_ADDR sp = get_frame_register_unsigned (this_frame, E_SP_REGNUM);
- return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
/* Normal frames. */
/* Allocate and initialize a frame cache. */
@@ -1349,9 +1330,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_skip_prologue (gdbarch, h8300_skip_prologue);
/* Frame unwinder. */
- set_gdbarch_unwind_pc (gdbarch, h8300_unwind_pc);
- set_gdbarch_unwind_sp (gdbarch, h8300_unwind_sp);
- set_gdbarch_dummy_id (gdbarch, h8300_dummy_id);
frame_base_set_default (gdbarch, &h8300_frame_base);
/*