summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-01-10 20:25:59 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-04-23 23:06:53 +0100
commit0f534d767b257fffd8a9b231c97ff9ed33688452 (patch)
tree60c2b4fa445a09b49e9aa2f9954161382b17e497
parent1ba7b7f9384eafc0748cee4c6731d6bdb717bd20 (diff)
downloadbinutils-gdb-0f534d767b257fffd8a9b231c97ff9ed33688452.tar.gz
gdb/tilegx: 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: * tilegx-tdep.c (tilegx_unwind_sp): Delete. (tilegx_unwind_pc): Delete. (tilegx_unwind_dummy_id): Delete. (tilegx_gdbarch_init): Don't register deleted functions with gdbarch.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/tilegx-tdep.c26
2 files changed, 8 insertions, 26 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 21f2ef48ceb..491ab31ba12 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com>
+ * tilegx-tdep.c (tilegx_unwind_sp): Delete.
+ (tilegx_unwind_pc): Delete.
+ (tilegx_unwind_dummy_id): Delete.
+ (tilegx_gdbarch_init): Don't register deleted functions with
+ gdbarch.
+
+2019-04-23 Andrew Burgess <andrew.burgess@embecosm.com>
+
* tic6x-tdep.c (tic6x_unwind_sp): Delete.
(tic6x_dummy_id): Delete.
(tic6x_gdbarch_init): Don't register deleted functions with
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index 3b1954fe419..a5f05ef1515 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -930,29 +930,6 @@ static const struct frame_base tilegx_frame_base = {
tilegx_frame_base_address
};
-static CORE_ADDR
-tilegx_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, TILEGX_SP_REGNUM);
-}
-
-static CORE_ADDR
-tilegx_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, TILEGX_PC_REGNUM);
-}
-
-static struct frame_id
-tilegx_unwind_dummy_id (struct gdbarch *gdbarch,
- struct frame_info *this_frame)
-{
- CORE_ADDR sp;
-
- sp = get_frame_register_unsigned (this_frame, TILEGX_SP_REGNUM);
- return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
-
/* We cannot read/write the "special" registers. */
static int
@@ -1027,9 +1004,6 @@ tilegx_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
/* Frame Info. */
- set_gdbarch_unwind_sp (gdbarch, tilegx_unwind_sp);
- set_gdbarch_unwind_pc (gdbarch, tilegx_unwind_pc);
- set_gdbarch_dummy_id (gdbarch, tilegx_unwind_dummy_id);
set_gdbarch_frame_align (gdbarch, tilegx_frame_align);
frame_base_set_default (gdbarch, &tilegx_frame_base);