summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-01-10 18:21:40 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-04-23 22:50:20 +0100
commit946c28d2f93789ff4eec86a8c321af35759fa20a (patch)
treea5d32de4dcaeb262b9d5d4fc039957ad1735cf15
parentbf12844a68f3f4f267846a19df6a280f53e7ec5f (diff)
downloadbinutils-gdb-946c28d2f93789ff4eec86a8c321af35759fa20a.tar.gz
gdb/lm32: 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/lm32-tdep.c (lm32_unwind_sp): Delete. (lm32_unwind_pc): Delete. (lm32_dummy_id): Delete. (lm32_gdbarch_init): Don't register deleted functions with gdbarch.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/lm32-tdep.c23
2 files changed, 8 insertions, 23 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca9beb827dd..36502182181 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb/lm32-tdep.c (lm32_unwind_sp): Delete.
+ (lm32_unwind_pc): Delete.
+ (lm32_dummy_id): Delete.
+ (lm32_gdbarch_init): Don't register deleted functions with
+ gdbarch.
+
+2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb/iq2000-tdep.c (iq2000_unwind_sp): Delete.
(iq2000_unwind_pc): Delete.
(iq2000_dummy_id): Delete.
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index f217dbae69c..1f746d250cd 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -383,26 +383,6 @@ lm32_return_value (struct gdbarch *gdbarch, struct value *function,
return RETURN_VALUE_REGISTER_CONVENTION;
}
-static CORE_ADDR
-lm32_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, SIM_LM32_PC_REGNUM);
-}
-
-static CORE_ADDR
-lm32_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, SIM_LM32_SP_REGNUM);
-}
-
-static struct frame_id
-lm32_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- CORE_ADDR sp = get_frame_register_unsigned (this_frame, SIM_LM32_SP_REGNUM);
-
- return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
/* Put here the code to store, into fi->saved_regs, the addresses of
the saved registers of frame described by FRAME_INFO. This
includes special registers such as pc and fp saved in special ways
@@ -552,9 +532,6 @@ lm32_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Frame unwinding. */
set_gdbarch_frame_align (gdbarch, lm32_frame_align);
frame_base_set_default (gdbarch, &lm32_frame_base);
- set_gdbarch_unwind_pc (gdbarch, lm32_unwind_pc);
- set_gdbarch_unwind_sp (gdbarch, lm32_unwind_sp);
- set_gdbarch_dummy_id (gdbarch, lm32_dummy_id);
frame_unwind_append_unwinder (gdbarch, &lm32_frame_unwind);
/* Breakpoints. */