aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-09-02 16:57:02 +0200
committerAndreas Färber <afaerber@suse.de>2014-03-13 19:20:48 +0100
commit75a34036d43dc961cbef2a4705682d0666caf384 (patch)
tree6397134c9dd534fee3ea7a2f2db6d01be6cf03e6 /linux-user
parentd0e39c5d70c4e0a9c41ef816a19887fd8f55c665 (diff)
exec: Change cpu_watchpoint_{insert,remove{,_by_ref,_all}} argument
Use CPUState. This lets us drop a few local env usages. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index dbc04b7d0f..280e295de7 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3437,13 +3437,14 @@ CPUArchState *cpu_copy(CPUArchState *env)
{
CPUState *cpu = ENV_GET_CPU(env);
CPUArchState *new_env = cpu_init(cpu_model);
+ CPUState *new_cpu = ENV_GET_CPU(new_env);
#if defined(TARGET_HAS_ICE)
CPUBreakpoint *bp;
CPUWatchpoint *wp;
#endif
/* Reset non arch specific state */
- cpu_reset(ENV_GET_CPU(new_env));
+ cpu_reset(new_cpu);
memcpy(new_env, env, sizeof(CPUArchState));
@@ -3457,7 +3458,7 @@ CPUArchState *cpu_copy(CPUArchState *env)
cpu_breakpoint_insert(new_env, bp->pc, bp->flags, NULL);
}
QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
- cpu_watchpoint_insert(new_env, wp->vaddr, (~wp->len_mask) + 1,
+ cpu_watchpoint_insert(new_cpu, wp->vaddr, (~wp->len_mask) + 1,
wp->flags, NULL);
}
#endif