aboutsummaryrefslogtreecommitdiff
path: root/gdb/m32r-tdep.c
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2018-02-06 17:31:33 +0000
committerYao Qi <yao.qi@linaro.org>2018-02-06 17:31:33 +0000
commit3f8c94b478c8f2e5c82a1425fd49e977ed969a7f (patch)
tree98859562f06ab868d5856ca94045e1a33e142f93 /gdb/m32r-tdep.c
parentc20c30f615756ddfccc4bb75c65ccfc1a399466e (diff)
downloadgdb-3f8c94b478c8f2e5c82a1425fd49e977ed969a7f.zip
gdb-3f8c94b478c8f2e5c82a1425fd49e977ed969a7f.tar.gz
gdb-3f8c94b478c8f2e5c82a1425fd49e977ed969a7f.tar.bz2
Remove some $ARCH_read_pc and $ARCH_write_pc
Nowadays, gdbarch_read_pc is called in this way, if (gdbarch_read_pc_p (gdbarch)) pc_val = gdbarch_read_pc (gdbarch, regcache); /* Else use per-frame method on get_current_frame. */ else if (gdbarch_pc_regnum (gdbarch) >= 0) { ULONGEST raw_val; if (regcache_cooked_read_unsigned (regcache, gdbarch_pc_regnum (gdbarch), &raw_val) == REG_UNAVAILABLE) some ports don't have to define its own gdbarch read_pc method if the pc value is simply a unsigned value from "pc" register. The same rule applies to regcache_write_pc. This patch removes these $ARCH_read_pc and $ARCH_write_pc functions. gdb: 2018-02-06 Yao Qi <yao.qi@linaro.org> * ft32-tdep.c (ft32_read_pc): Remove. (ft32_write_pc): Remove. (ft32_gdbarch_init): Update. * m32r-tdep.c (m32r_read_pc): Remove. (m32r_gdbarch_init): Update. * mep-tdep.c (mep_read_pc): Remove. (mep_gdbarch_init): Update. * microblaze-tdep.c (microblaze_write_pc): Remove. (microblaze_gdbarch_init): Update. * mn10300-tdep.c (mn10300_read_pc): Remove. (mn10300_write_pc): Remove. (mn10300_gdbarch_init): Update. * moxie-tdep.c (moxie_read_pc): Remove. (moxie_write_pc): Remove. (moxie_gdbarch_init): Update.
Diffstat (limited to 'gdb/m32r-tdep.c')
-rw-r--r--gdb/m32r-tdep.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index 0fe6754..fd79f3f 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -650,14 +650,6 @@ m32r_frame_unwind_cache (struct frame_info *this_frame,
}
static CORE_ADDR
-m32r_read_pc (struct regcache *regcache)
-{
- ULONGEST pc;
- regcache_cooked_read_unsigned (regcache, M32R_PC_REGNUM, &pc);
- return pc;
-}
-
-static CORE_ADDR
m32r_unwind_sp (struct gdbarch *gdbarch, struct frame_info *next_frame)
{
return frame_unwind_register_unsigned (next_frame, M32R_SP_REGNUM);
@@ -912,7 +904,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_read_pc (gdbarch, m32r_read_pc);
set_gdbarch_unwind_sp (gdbarch, m32r_unwind_sp);
set_gdbarch_num_regs (gdbarch, M32R_NUM_REGS);