* 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.
This commit is contained in:
Ulrich Weigand
2007-05-06 18:55:41 +00:00
parent 56be38147c
commit 316f20603a
19 changed files with 64 additions and 41 deletions

View 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;