aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-tdep.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-01-10 18:29:47 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-04-23 22:50:21 +0100
commit5e79b7bb69c797c3ca401cfa0f7a616eb2e3efe8 (patch)
treed9f640d446f9f0762754ea50acdababb470d4c67 /gdb/m32r-tdep.c
parent89b268d8233e11acdfbc5af196166aacc1440ff3 (diff)
downloadgdb-5e79b7bb69c797c3ca401cfa0f7a616eb2e3efe8.zip
gdb-5e79b7bb69c797c3ca401cfa0f7a616eb2e3efe8.tar.gz
gdb-5e79b7bb69c797c3ca401cfa0f7a616eb2e3efe8.tar.bz2
gdb/m32r: 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: * m32r-tdep.c (m32r_unwind_sp): Delete. (m32r_unwind_pc): Delete. (m32r_dummy_id): Delete. (m32r_gdbarch_init): Don't register deleted functions with gdbarch.
Diffstat (limited to 'gdb/m32r-tdep.c')
-rw-r--r--gdb/m32r-tdep.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 18acdb6..a10558d 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -649,13 +649,6 @@ m32r_frame_unwind_cache (struct frame_info *this_frame,
}
static CORE_ADDR
-m32r_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, M32R_SP_REGNUM);
-}
-
-
-static CORE_ADDR
m32r_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr, int nargs,
struct value **args, CORE_ADDR sp,
@@ -798,14 +791,6 @@ m32r_return_value (struct gdbarch *gdbarch, struct value *function,
}
}
-
-
-static CORE_ADDR
-m32r_unwind_pc (struct gdbarch *gdbarch, struct frame_info *next_frame)
-{
- return frame_unwind_register_unsigned (next_frame, M32R_PC_REGNUM);
-}
-
/* Given a GDB frame, determine the address of the calling function's
frame. This will be used to create a new GDB frame struct. */
@@ -872,18 +857,6 @@ static const struct frame_base m32r_frame_base = {
m32r_frame_base_address
};
-/* Assuming THIS_FRAME is a dummy, return the frame ID of that dummy
- frame. The frame ID's base needs to match the TOS value saved by
- save_dummy_frame_tos(), and the PC match the dummy frame's breakpoint. */
-
-static struct frame_id
-m32r_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
-{
- CORE_ADDR sp = get_frame_register_unsigned (this_frame, M32R_SP_REGNUM);
- return frame_id_build (sp, get_frame_pc (this_frame));
-}
-
-
static gdbarch_init_ftype m32r_gdbarch_init;
static struct gdbarch *
@@ -904,8 +877,6 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_wchar_bit (gdbarch, 16);
set_gdbarch_wchar_signed (gdbarch, 0);
- set_gdbarch_unwind_sp (gdbarch, m32r_unwind_sp);
-
set_gdbarch_num_regs (gdbarch, M32R_NUM_REGS);
set_gdbarch_pc_regnum (gdbarch, M32R_PC_REGNUM);
set_gdbarch_sp_regnum (gdbarch, M32R_SP_REGNUM);
@@ -928,14 +899,6 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
frame_base_set_default (gdbarch, &m32r_frame_base);
- /* Methods for saving / extracting a dummy frame's ID. The ID's
- stack address must match the SP value returned by
- PUSH_DUMMY_CALL, and saved by generic_save_dummy_frame_tos. */
- set_gdbarch_dummy_id (gdbarch, m32r_dummy_id);
-
- /* Return the unwound PC value. */
- set_gdbarch_unwind_pc (gdbarch, m32r_unwind_pc);
-
/* Hook in ABI-specific overrides, if they have been registered. */
gdbarch_init_osabi (info, gdbarch);