freebsd-ports/emulators/qemu-devel/files/extra-patch-3d175d6ed5b809976662135369c639f53780ca5c
Juergen Lock cf14e8bdd7 - Update to 2.0.0 - announce message is here:
http://article.gmane.org/gmane.comp.emulators.qemu/267615

- Take updated bsd-user patches from sbruno's github repo. [1]
- Add headers to my recent bsd-user patches. (they are applied as in
  the EXTRA_PATCHES order in the port Makefile)

Submitted by:	sbruno [1]
Obtained from:	https://github.com/seanbruno/qemu/commits/bsd-user [1]
2014-04-18 10:53:51 +00:00

38 lines
1.4 KiB
Text

diff --git a/bsd-user/main.c b/bsd-user/main.c
index f27fcbc..16a0590 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -272,6 +272,7 @@ void init_task_state(TaskState *ts)
CPUArchState *cpu_copy(CPUArchState *env)
{
CPUArchState *new_env = cpu_init(cpu_model);
+ CPUState *cpu;
#if defined(TARGET_HAS_ICE)
CPUBreakpoint *bp;
CPUWatchpoint *wp;
@@ -281,18 +282,19 @@ CPUArchState *cpu_copy(CPUArchState *env)
cpu_reset(ENV_GET_CPU(new_env));
memcpy(new_env, env, sizeof(CPUArchState));
+ cpu = ENV_GET_CPU(env);
/* Clone all break/watchpoints.
Note: Once we support ptrace with hw-debug register access, make sure
BP_CPU break/watchpoints are handled correctly on clone. */
- QTAILQ_INIT(&env->breakpoints);
- QTAILQ_INIT(&env->watchpoints);
+ QTAILQ_INIT(&cpu->breakpoints);
+ QTAILQ_INIT(&cpu->watchpoints);
#if defined(TARGET_HAS_ICE)
- QTAILQ_FOREACH(bp, &env->breakpoints, entry) {
- cpu_breakpoint_insert(new_env, bp->pc, bp->flags, NULL);
+ QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) {
+ cpu_breakpoint_insert(cpu, bp->pc, bp->flags, NULL);
}
- QTAILQ_FOREACH(wp, &env->watchpoints, entry) {
- cpu_watchpoint_insert(new_env, wp->vaddr, (~wp->len_mask) + 1,
+ QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) {
+ cpu_watchpoint_insert(cpu, wp->vaddr, (~wp->len_mask) + 1,
wp->flags, NULL);
}
#endif