From 3f8c94b478c8f2e5c82a1425fd49e977ed969a7f Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Tue, 6 Feb 2018 17:31:33 +0000 Subject: 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 * 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. --- gdb/microblaze-tdep.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'gdb/microblaze-tdep.c') diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c index 6b1c2ec..0cb9633 100644 --- a/gdb/microblaze-tdep.c +++ b/gdb/microblaze-tdep.c @@ -601,11 +601,6 @@ microblaze_stabs_argument_has_addr (struct gdbarch *gdbarch, struct type *type) return (TYPE_LENGTH (type) == 16); } -static void -microblaze_write_pc (struct regcache *regcache, CORE_ADDR pc) -{ - regcache_cooked_write_unsigned (regcache, MICROBLAZE_PC_REGNUM, pc); -} static int dwarf2_to_reg_map[78] = { 0 /* r0 */, 1 /* r1 */, 2 /* r2 */, 3 /* r3 */, /* 0- 3 */ @@ -738,8 +733,6 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_args_skip (gdbarch, 8); - set_gdbarch_write_pc (gdbarch, microblaze_write_pc); - set_gdbarch_unwind_pc (gdbarch, microblaze_unwind_pc); microblaze_register_g_packet_guesses (gdbarch); -- cgit v1.1