aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2018-09-09 17:14:20 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-02-27 16:54:43 +0200
commitb56bf084434de08080875134e983f8b46eb2328f (patch)
tree66082364f7eef0ceae4e87ad5691743fee818c78
parenta19a650fcca359a02bfadb201c9b032ce7479525 (diff)
downloadgdb-b56bf084434de08080875134e983f8b46eb2328f.zip
gdb-b56bf084434de08080875134e983f8b46eb2328f.tar.gz
gdb-b56bf084434de08080875134e983f8b46eb2328f.tar.bz2
gdb/bfin: Use default gdbarch methods where possible
Make use of the default gdbarch methods for gdbarch_dummy_id, and gdbarch_unwind_pc. 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/bfin-tdep.c (bfin_dummy_id): Delete. (bfin_unwind_pc): Delete. (bfin_gdbarch_init): Don't register deleted functions with gdbarch.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/bfin-tdep.c18
2 files changed, 6 insertions, 18 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a35fc7c..4b4d338 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2019-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
+ * gdb/bfin-tdep.c (bfin_dummy_id): Delete.
+ (bfin_unwind_pc): Delete.
+ (bfin_gdbarch_init): Don't register deleted functions with gdbarch.
+
+2019-02-27 Andrew Burgess <andrew.burgess@embecosm.com>
+
* gdb/arm-tdep.c (arm_dummy_id): Delete.
(arm_unwind_pc): Delete.
(arm_unwind_sp): Delete.
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index d0279ca..9d3e8eb 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -756,22 +756,6 @@ static const struct frame_base bfin_frame_base =
bfin_frame_args_address
};
-static struct frame_id
-bfin_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- CORE_ADDR sp;
-
- sp = get_frame_register_unsigned (this_frame, BFIN_SP_REGNUM);
-
- return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
-static CORE_ADDR
-bfin_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, BFIN_PC_REGNUM);
-}
-
static CORE_ADDR
bfin_frame_align (struct gdbarch *gdbarch, CORE_ADDR address)
{
@@ -826,7 +810,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_dwarf2_reg_to_regnum (gdbarch, bfin_reg_to_regnum);
set_gdbarch_register_name (gdbarch, bfin_register_name);
set_gdbarch_register_type (gdbarch, bfin_register_type);
- set_gdbarch_dummy_id (gdbarch, bfin_dummy_id);
set_gdbarch_push_dummy_call (gdbarch, bfin_push_dummy_call);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_return_value (gdbarch, bfin_return_value);
@@ -836,7 +819,6 @@ bfin_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_sw_breakpoint_from_kind (gdbarch, bfin_sw_breakpoint_from_kind);
set_gdbarch_decr_pc_after_break (gdbarch, 2);
set_gdbarch_frame_args_skip (gdbarch, 8);
- set_gdbarch_unwind_pc (gdbarch, bfin_unwind_pc);
set_gdbarch_frame_align (gdbarch, bfin_frame_align);
/* Hook in ABI-specific overrides, if they have been registered. */