]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* mips-tdep.h (mips_write_pc): New prototype.
authorMaciej W. Rozycki <macro@linux-mips.org>
Fri, 18 May 2012 12:43:05 +0000 (12:43 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Fri, 18 May 2012 12:43:05 +0000 (12:43 +0000)
* mips-tdep.c (mips_write_pc): Make external, add description.
* mips-linux-tdep.c (mips_linux_write_pc): Use mips_write_pc,
add description.

gdb/ChangeLog
gdb/mips-linux-tdep.c
gdb/mips-tdep.c
gdb/mips-tdep.h

index c06c7717417fc1ce97f54ffc8f36669b824800d0..4ad8c9604b7e5409e3632348ad8d0639b5277e3c 100644 (file)
@@ -1,3 +1,10 @@
+2012-05-18  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * 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.
+
 2012-05-18  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * mips-tdep.c (mips_read_pc): Use gdbarch_pc_regnum instead of
index 47af572f245088cdd100ea6e28164c8bde4c8a55..69cffc33e1cfb38e798b85b65a290c4b9621f5f8 100644 (file)
@@ -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))
index 37f4041a8b891d8a127c845f3cf82202133b3492..6d31b39b7dd41d8ad456123008e450db89dc84bf 100644 (file)
@@ -1141,7 +1141,9 @@ mips_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
            get_frame_pc (this_frame));
 }
 
-static void
+/* Implement the "write_pc" gdbarch method.  */
+
+void
 mips_write_pc (struct regcache *regcache, CORE_ADDR pc)
 {
   int regnum = gdbarch_pc_regnum (get_regcache_arch (regcache));
index 72cc49adf99d3164aeb37a2e7ad06d96d1f0c57a..9dd45418ae90cc70f43cbbcc3b99f453d7290d2c 100644 (file)
@@ -159,6 +159,9 @@ extern int mips_pc_is_mips16 (bfd_vma memaddr);
 /* Return the currently configured (or set) saved register size.  */
 extern unsigned int mips_abi_regsize (struct gdbarch *gdbarch);
 
+/* Make PC the address of the next instruction to execute.  */
+extern void mips_write_pc (struct regcache *regcache, CORE_ADDR pc);
+
 /* Target descriptions which only indicate the size of general
    registers.  */
 extern struct target_desc *mips_tdesc_gp32;