diff options
author | Thierry Bultel | 2015-06-12 11:24:10 +0200 |
---|---|---|
committer | Riku Voipio | 2015-06-16 07:21:02 +0200 |
commit | 1d085f6cae51b1a0fb92ad03ce8bf038e29c9750 (patch) | |
tree | 7346acda33fd8e652182a38486a0c696147b5dac /linux-user | |
parent | linux-user: use __get_user and __put_user in cmsg conversions (diff) | |
download | qemu-1d085f6cae51b1a0fb92ad03ce8bf038e29c9750.tar.gz qemu-1d085f6cae51b1a0fb92ad03ce8bf038e29c9750.tar.xz qemu-1d085f6cae51b1a0fb92ad03ce8bf038e29c9750.zip |
linux-user: fix the breakpoint inheritance in spawned threads
When a thread is spawned, cpu_copy re-initializes
the bp & wp lists of current thread, instead of the ones
of the new thread.
The effect is that breakpoints are no longer hit.
Signed-off-by: Thierry Bultel <thierry.bultel@basystemes.fr>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index a0d3e58bd4..c855bccadc 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -3459,8 +3459,8 @@ CPUArchState *cpu_copy(CPUArchState *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(&cpu->breakpoints); - QTAILQ_INIT(&cpu->watchpoints); + QTAILQ_INIT(&new_cpu->breakpoints); + QTAILQ_INIT(&new_cpu->watchpoints); QTAILQ_FOREACH(bp, &cpu->breakpoints, entry) { cpu_breakpoint_insert(new_cpu, bp->pc, bp->flags, NULL); } |