]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* target.h (struct target_ops): Add REGCACHE parameter to
authorUlrich Weigand <uweigand@de.ibm.com>
Sun, 6 May 2007 18:55:41 +0000 (18:55 +0000)
committerUlrich Weigand <uweigand@de.ibm.com>
Sun, 6 May 2007 18:55:41 +0000 (18:55 +0000)
to_prepare_to_store.
(target_prepare_to_store): Likewise.
* target.c (debug_to_prepare_to_store): Add REGCACHE parameter.
(update_current_target): Adapt prepare_to_store de_fault rule.

* regcache.c (regcache_raw_write): Pass regcache to
target_prepare_to_store.

* inftarg.c (child_prepare_to_store): Add REGCACHE parameter.
Do not call CHILD_PREPARE_TO_STORE.
* gnu-nat.c (gnu_prepare_to_store): Likewise.
* procfs.c (procfs_prepare_to_store): Likewise.

* inf-child.c (inf_child_prepare_to_store): Add REGCACHE parameter.
* go32-nat.c (go32_prepare_to_store): Likewise.
* monitor.c (monitor_prepare_to_store): Likewise.
* nto-procfs.c (procfs_prepare_to_store): Likewise.
* remote-m32r-sdi.c (m32r_prepare_to_store): Likewise.
* remote-mips.c (mips_prepare_to_store): Likewise.
* remote-sim.c (gdbsim_prepare_to_store): Likewise.
* win32-nat.c (win32_prepare_to_store): Likewise.

* remote.c (remote_prepare_to_store): Add REGCACHE parameter.
Use it instead of current_regcache.

* hpux-thread.c (hpux_thread_prepare_to_store): Add REGCACHE
parameter.  Pass it on to next target.
* sol-thread.c (sol_thread_prepare_to_store): Likewise.

19 files changed:
gdb/ChangeLog
gdb/gnu-nat.c
gdb/go32-nat.c
gdb/hpux-thread.c
gdb/inf-child.c
gdb/inftarg.c
gdb/monitor.c
gdb/nto-procfs.c
gdb/procfs.c
gdb/regcache.c
gdb/remote-m32r-sdi.c
gdb/remote-mips.c
gdb/remote-sim.c
gdb/remote.c
gdb/sol-thread.c
gdb/target.c
gdb/target.h
gdb/win32-nat.c
gdb/windows-nat.c

index a24b284c236034bbcd17e13a8dfac2fba8bf8a2d..2420767d92a362489bb92ba851c9d9daa39255f9 100644 (file)
@@ -1,3 +1,35 @@
+2007-05-06  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * target.h (struct target_ops): Add REGCACHE parameter to
+       to_prepare_to_store.
+       (target_prepare_to_store): Likewise.
+       * target.c (debug_to_prepare_to_store): Add REGCACHE parameter.
+       (update_current_target): Adapt prepare_to_store de_fault rule.
+
+       * regcache.c (regcache_raw_write): Pass regcache to
+       target_prepare_to_store.
+
+       * inftarg.c (child_prepare_to_store): Add REGCACHE parameter.
+       Do not call CHILD_PREPARE_TO_STORE.
+       * gnu-nat.c (gnu_prepare_to_store): Likewise.
+       * procfs.c (procfs_prepare_to_store): Likewise.
+
+       * inf-child.c (inf_child_prepare_to_store): Add REGCACHE parameter.
+       * go32-nat.c (go32_prepare_to_store): Likewise.
+       * monitor.c (monitor_prepare_to_store): Likewise.
+       * nto-procfs.c (procfs_prepare_to_store): Likewise.
+       * remote-m32r-sdi.c (m32r_prepare_to_store): Likewise.
+       * remote-mips.c (mips_prepare_to_store): Likewise.
+       * remote-sim.c (gdbsim_prepare_to_store): Likewise.
+       * win32-nat.c (win32_prepare_to_store): Likewise.
+
+       * remote.c (remote_prepare_to_store): Add REGCACHE parameter.
+       Use it instead of current_regcache.
+
+       * hpux-thread.c (hpux_thread_prepare_to_store): Add REGCACHE
+       parameter.  Pass it on to next target.
+       * sol-thread.c (sol_thread_prepare_to_store): Likewise.
+
 2007-05-06  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * target.h (struct regcache): Add forward declaration.
index 4e8b82eb42ff1414114ecffd70fab58ad3dd0d8c..80ceb9075ad5fb42e0d08370e0aa8e69806f4104 100644 (file)
@@ -2207,11 +2207,8 @@ gnu_terminal_init_inferior (void)
    that registers contains all the registers from the program being
    debugged.  */
 static void
-gnu_prepare_to_store (void)
+gnu_prepare_to_store (struct regcache *regcache)
 {
-#ifdef CHILD_PREPARE_TO_STORE
-  CHILD_PREPARE_TO_STORE ();
-#endif
 }
 
 static void
index b4b86728aa1fce7cdd46da9b7ebd57940ea011ff..a794c61b8ff462eae47fd0e0c5746778d8fd04e5 100644 (file)
@@ -177,7 +177,7 @@ static ptid_t go32_wait (ptid_t ptid,
 static void go32_fetch_registers (struct regcache *, int regno);
 static void store_register (const struct regcache *, int regno);
 static void go32_store_registers (struct regcache *, int regno);
-static void go32_prepare_to_store (void);
+static void go32_prepare_to_store (struct regcache *);
 static int go32_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
                             int write,
                             struct mem_attrib *attrib,
@@ -519,7 +519,7 @@ go32_store_registers (struct regcache *regcache, int regno)
 }
 
 static void
-go32_prepare_to_store (void)
+go32_prepare_to_store (struct regcache *regcache)
 {
 }
 
index f65208cce9731c6d00d67b1fe936993feb8af044..71fe9f98e0e238b5ec3e6145d29fe7e9474ae488 100644 (file)
@@ -390,9 +390,9 @@ hpux_thread_store_registers (struct regcache *regcache, int regno)
    debugged.  */
 
 static void
-hpux_thread_prepare_to_store (void)
+hpux_thread_prepare_to_store (struct regcache *regcache)
 {
-  deprecated_child_ops.to_prepare_to_store ();
+  deprecated_child_ops.to_prepare_to_store (regcache);
 }
 
 static int
index 00bb7fd640ec130bf2fb2f60aa65a57f542951f0..a30d519558ae854d510b003d3f3d1cd93f247c4e 100644 (file)
@@ -66,7 +66,7 @@ inf_child_post_attach (int pid)
    program being debugged.  */
 
 static void
-inf_child_prepare_to_store (void)
+inf_child_prepare_to_store (struct regcache *regcache)
 {
 }
 
index 3f0467fbde11ab29bf62297e8a25adf1b3229276..6b9d3d780789427c8dba72a3b0bf80fcfeb1a3c4 100644 (file)
@@ -46,7 +46,7 @@ extern struct exception_event_record
 
 extern void _initialize_inftarg (void);
 
-static void child_prepare_to_store (void);
+static void child_prepare_to_store (struct regcache *);
 
 #ifndef CHILD_WAIT
 static ptid_t child_wait (ptid_t, struct target_waitstatus *);
@@ -259,11 +259,8 @@ child_detach (char *args, int from_tty)
    debugged.  */
 
 static void
-child_prepare_to_store (void)
+child_prepare_to_store (struct regcache *regcache)
 {
-#ifdef CHILD_PREPARE_TO_STORE
-  CHILD_PREPARE_TO_STORE ();
-#endif
 }
 
 /* Print status information about what we're accessing.  */
index 00695b8e1cb4537e0b99079e0e6a4650b92d114a..494df39d0fd5f60b794ff3f312e69df68ef6e5e9 100644 (file)
@@ -1367,7 +1367,7 @@ monitor_store_registers (struct regcache *regcache, int regno)
    debugged.  */
 
 static void
-monitor_prepare_to_store (void)
+monitor_prepare_to_store (struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs */
 }
index 34ae3cd9618f91136e4fd4185bda92354ab1bfe9..57bfd87597a1147c4d2bf35057146a93f8021fd9 100644 (file)
@@ -1109,7 +1109,7 @@ procfs_kill_inferior (void)
 /* Store register REGNO, or all registers if REGNO == -1, from the contents
    of REGISTERS.  */
 static void
-procfs_prepare_to_store (void)
+procfs_prepare_to_store (struct regcache *regcache)
 {
 }
 
index 788a661c6cd4fd4735c36fe4fdbaa2c1d68e1fa6..606466ec4ef8ae5c85a59e3db8e6e53c9b5174fd 100644 (file)
@@ -123,7 +123,7 @@ static void procfs_files_info (struct target_ops *);
 static void procfs_fetch_registers (struct regcache *, int);
 static void procfs_store_registers (struct regcache *, int);
 static void procfs_notice_signals (ptid_t);
-static void procfs_prepare_to_store (void);
+static void procfs_prepare_to_store (struct regcache *);
 static void procfs_kill_inferior (void);
 static void procfs_mourn_inferior (void);
 static void procfs_create_inferior (char *, char *, char **, int);
@@ -3732,11 +3732,8 @@ procfs_fetch_registers (struct regcache *regcache, int regnum)
    from the program being debugged.  */
 
 static void
-procfs_prepare_to_store (void)
+procfs_prepare_to_store (struct regcache *regcache)
 {
-#ifdef CHILD_PREPARE_TO_STORE
-  CHILD_PREPARE_TO_STORE ();
-#endif
 }
 
 /* Store register REGNUM back into the inferior.  If REGNUM is -1, do
index 15e4dba0441b2844215fb38dc9e39f7f8b65792a..c54585c98cd533567545f5cc1794b01ef727280d 100644 (file)
@@ -669,7 +669,7 @@ regcache_raw_write (struct regcache *regcache, int regnum,
                  regcache->descr->sizeof_register[regnum]) == 0))
     return;
 
-  target_prepare_to_store ();
+  target_prepare_to_store (regcache);
   memcpy (register_buffer (regcache, regnum), buf,
          regcache->descr->sizeof_register[regnum]);
   regcache->register_valid_p[regnum] = 1;
index 110855a21ef267f619476f215bc09d3ab96b5a16..a4452de547d1332fd0068bd706d2b2afe692d7f3 100644 (file)
@@ -1014,7 +1014,7 @@ m32r_store_register (struct regcache *regcache, int regno)
    debugged.  */
 
 static void
-m32r_prepare_to_store (void)
+m32r_prepare_to_store (struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs */
   if (remote_debug)
index dcbc15c54718669b66e47f981b8af2c328aab7f3..5c2954db2470471e80cc8b9b084231f35d7b9879 100644 (file)
@@ -98,7 +98,7 @@ static int mips_map_regno (int regno);
 
 static void mips_fetch_registers (struct regcache *regcache, int regno);
 
-static void mips_prepare_to_store (void);
+static void mips_prepare_to_store (struct regcache *regcache);
 
 static void mips_store_registers (struct regcache *regcache, int regno);
 
@@ -1946,7 +1946,7 @@ mips_fetch_registers (struct regcache *regcache, int regno)
    registers, so this function doesn't have to do anything.  */
 
 static void
-mips_prepare_to_store (void)
+mips_prepare_to_store (struct regcache *regcache)
 {
 }
 
index 425d1a69253fe2b489bb83e7c1b9d5b4660a8a38..0a13713c14c59ff2b71dc1af605a72a361b3901f 100644 (file)
@@ -91,7 +91,7 @@ static void gdbsim_resume (ptid_t ptid, int step, enum target_signal siggnal);
 
 static ptid_t gdbsim_wait (ptid_t ptid, struct target_waitstatus *status);
 
-static void gdbsim_prepare_to_store (void);
+static void gdbsim_prepare_to_store (struct regcache *regcache);
 
 static void gdbsim_files_info (struct target_ops *target);
 
@@ -734,7 +734,7 @@ gdbsim_wait (ptid_t ptid, struct target_waitstatus *status)
    debugged.  */
 
 static void
-gdbsim_prepare_to_store (void)
+gdbsim_prepare_to_store (struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs */
 }
index 2c31c82e0083bbd133fd161e090dd3e30f83d57e..8e7999d658339b5f327431103f16b4be375e8b1f 100644 (file)
@@ -89,7 +89,7 @@ static void build_remote_gdbarch_data (void);
 
 static void remote_files_info (struct target_ops *ignore);
 
-static void remote_prepare_to_store (void);
+static void remote_prepare_to_store (struct regcache *regcache);
 
 static void remote_fetch_registers (struct regcache *regcache, int regno);
 
@@ -3730,7 +3730,7 @@ remote_fetch_registers (struct regcache *regcache, int regnum)
    first.  */
 
 static void
-remote_prepare_to_store (void)
+remote_prepare_to_store (struct regcache *regcache)
 {
   struct remote_arch_state *rsa = get_remote_arch_state ();
   int i;
@@ -3744,7 +3744,7 @@ remote_prepare_to_store (void)
       /* Make sure all the necessary registers are cached.  */
       for (i = 0; i < NUM_REGS; i++)
        if (rsa->regs[i].in_g_packet)
-         regcache_raw_read (current_regcache, rsa->regs[i].regnum, buf);
+         regcache_raw_read (regcache, rsa->regs[i].regnum, buf);
       break;
     case PACKET_ENABLE:
       break;
index 722e253b84dcfc45ca74b344f264588a7994064a..16e3463c8addc8ec3a92d675bb5173cd753f7774 100644 (file)
@@ -649,9 +649,9 @@ sol_thread_store_registers (struct regcache *regcache, int regnum)
    program being debugged.  */
 
 static void
-sol_thread_prepare_to_store (void)
+sol_thread_prepare_to_store (struct regcache *regcache)
 {
-  procfs_ops.to_prepare_to_store ();
+  procfs_ops.to_prepare_to_store (regcache);
 }
 
 /* Transfer LEN bytes between GDB address MYADDR and target address
index fd833decb91dfaf3776b76e5f069b02f55944136..bbd97fa1806de25e37102877ac5b1d9fc4ded983 100644 (file)
@@ -110,7 +110,7 @@ static void debug_to_fetch_registers (struct regcache *, int);
 
 static void debug_to_store_registers (struct regcache *, int);
 
-static void debug_to_prepare_to_store (void);
+static void debug_to_prepare_to_store (struct regcache *);
 
 static void debug_to_files_info (struct target_ops *);
 
@@ -509,7 +509,7 @@ update_current_target (void)
            (void (*) (struct regcache *, int))
            noprocess);
   de_fault (to_prepare_to_store,
-           (void (*) (void))
+           (void (*) (struct regcache *))
            noprocess);
   de_fault (deprecated_xfer_memory,
            (int (*) (CORE_ADDR, gdb_byte *, int, int, struct mem_attrib *, struct target_ops *))
@@ -2195,9 +2195,9 @@ debug_to_store_registers (struct regcache *regcache, int regno)
 }
 
 static void
-debug_to_prepare_to_store (void)
+debug_to_prepare_to_store (struct regcache *regcache)
 {
-  debug_target.to_prepare_to_store ();
+  debug_target.to_prepare_to_store (regcache);
 
   fprintf_unfiltered (gdb_stdlog, "target_prepare_to_store ()\n");
 }
index ad4e437b49d1e3a34fd8090dc7b10f4cb9129ac1..33820443716ec9e3c1f1d37a5264cae8f969d310 100644 (file)
@@ -326,7 +326,7 @@ struct target_ops
     ptid_t (*to_wait) (ptid_t, struct target_waitstatus *);
     void (*to_fetch_registers) (struct regcache *, int);
     void (*to_store_registers) (struct regcache *, int);
-    void (*to_prepare_to_store) (void);
+    void (*to_prepare_to_store) (struct regcache *);
 
     /* Transfer LEN bytes of memory between GDB address MYADDR and
        target address MEMADDR.  If WRITE, transfer them to the target, else
@@ -606,8 +606,8 @@ extern void target_disconnect (char *, int);
    that REGISTERS contains all the registers from the program being
    debugged.  */
 
-#define        target_prepare_to_store()       \
-     (*current_target.to_prepare_to_store) ()
+#define        target_prepare_to_store(regcache)       \
+     (*current_target.to_prepare_to_store) (regcache)
 
 extern DCACHE *target_dcache;
 
index 922cc2861950d1fc963985d7811a3960eddff3f5..b52edd0bdf8233358a499ccf335b0bc5c072fb29 100644 (file)
@@ -2039,7 +2039,7 @@ win32_kill_inferior (void)
 }
 
 static void
-win32_prepare_to_store (void)
+win32_prepare_to_store (struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs */
 }
index 922cc2861950d1fc963985d7811a3960eddff3f5..b52edd0bdf8233358a499ccf335b0bc5c072fb29 100644 (file)
@@ -2039,7 +2039,7 @@ win32_kill_inferior (void)
 }
 
 static void
-win32_prepare_to_store (void)
+win32_prepare_to_store (struct regcache *regcache)
 {
   /* Do nothing, since we can store individual regs */
 }