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 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.
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
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,
}
static void
-go32_prepare_to_store (void)
+go32_prepare_to_store (struct regcache *regcache)
{
}
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
program being debugged. */
static void
-inf_child_prepare_to_store (void)
+inf_child_prepare_to_store (struct regcache *regcache)
{
}
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 *);
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. */
debugged. */
static void
-monitor_prepare_to_store (void)
+monitor_prepare_to_store (struct regcache *regcache)
{
/* Do nothing, since we can store individual regs */
}
/* 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)
{
}
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);
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
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;
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)
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);
registers, so this function doesn't have to do anything. */
static void
-mips_prepare_to_store (void)
+mips_prepare_to_store (struct regcache *regcache)
{
}
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);
debugged. */
static void
-gdbsim_prepare_to_store (void)
+gdbsim_prepare_to_store (struct regcache *regcache)
{
/* Do nothing, since we can store individual regs */
}
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);
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;
/* 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;
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
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 *);
(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 *))
}
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");
}
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
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;
}
static void
-win32_prepare_to_store (void)
+win32_prepare_to_store (struct regcache *regcache)
{
/* Do nothing, since we can store individual regs */
}
}
static void
-win32_prepare_to_store (void)
+win32_prepare_to_store (struct regcache *regcache)
{
/* Do nothing, since we can store individual regs */
}