summaryrefslogtreecommitdiff
path: root/gdb/mips-linux-tdep.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-05-18 12:43:04 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-05-18 12:43:04 +0000
commit0de57761edd371e460ff8722b4e072ded309447e (patch)
treeb66215df2594be5a7ea6bee0de7af2eb5e6ad2a2 /gdb/mips-linux-tdep.c
parente00eef26cedbe11f00e3b79ee5175160ed06299b (diff)
downloadgdb-0de57761edd371e460ff8722b4e072ded309447e.tar.gz
* mips-tdep.h (mips_write_pc): New prototype.
* mips-tdep.c (mips_write_pc): Make external, add description. * mips-linux-tdep.c (mips_linux_write_pc): Use mips_write_pc, add description.
Diffstat (limited to 'gdb/mips-linux-tdep.c')
-rw-r--r--gdb/mips-linux-tdep.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 47af572f245..69cffc33e1c 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -1151,11 +1151,14 @@ mips_linux_n32n64_sigframe_init (const struct tramp_frame *self,
trad_frame_set_id (this_cache, frame_id_build (frame_sp, func));
}
+/* Implement the "write_pc" gdbarch method. */
+
static void
mips_linux_write_pc (struct regcache *regcache, CORE_ADDR pc)
{
struct gdbarch *gdbarch = get_regcache_arch (regcache);
- regcache_cooked_write_unsigned (regcache, gdbarch_pc_regnum (gdbarch), pc);
+
+ mips_write_pc (regcache, pc);
/* Clear the syscall restart flag. */
if (mips_linux_restart_reg_p (gdbarch))