[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub
From: |
Lionel Landwerlin |
Subject: |
Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub |
Date: |
Sun, 28 Dec 2008 23:21:05 +0100 |
Le samedi 13 décembre 2008 à 14:49 +0100, Jan Kiszka a écrit :
> -------->
>
> Subject: [PATCH] Adopt cpu_copy to new breakpoint API
>
> Latest changes to the cpu_breakpoint/watchpoint API broke cpu_copy. This
> patch fixes it by cloning the breakpoint and watchpoint lists
> appropriately.
>
> Thanks to Lionel Landwerlin for pointing out.
>
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
>
> exec.c | 24 +++++++++++++++++++++++-
> 1 files changed, 23 insertions(+), 1 deletions(-)
>
> diff --git a/exec.c b/exec.c
> index 44f6a42..193a43c 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1654,12 +1654,34 @@ void cpu_abort(CPUState *env, const char *fmt, ...)
> CPUState *cpu_copy(CPUState *env)
> {
> CPUState *new_env = cpu_init(env->cpu_model_str);
> - /* preserve chaining and index */
> CPUState *next_cpu = new_env->next_cpu;
> int cpu_index = new_env->cpu_index;
> +#if defined(TARGET_HAS_ICE)
> + CPUBreakpoint *bp;
> + CPUWatchpoint *wp;
> +#endif
> +
> memcpy(new_env, env, sizeof(CPUState));
> +
> + /* Preserve chaining and index. */
> new_env->next_cpu = next_cpu;
> new_env->cpu_index = cpu_index;
> +
> + /* 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. */
> + TAILQ_INIT(&env->breakpoints);
> + TAILQ_INIT(&env->watchpoints);
> +#if defined(TARGET_HAS_ICE)
> + TAILQ_FOREACH(bp, &env->breakpoints, entry) {
> + cpu_breakpoint_insert(new_env, bp->pc, bp->flags, NULL);
> + }
> + TAILQ_FOREACH(wp, &env->watchpoints, entry) {
> + cpu_watchpoint_insert(new_env, wp->vaddr, (~wp->len_mask) + 1,
> + wp->flags, NULL);
> + }
> +#endif
> +
> return new_env;
> }
>
>
Is this patch going to be integrated anytime soon ?
--
Lione Landwerlin
O p e n W i d e 14, rue Gaillon 75002 Paris
- Re: [Qemu-devel] [linux-user] Fixed Qemu crash using Gdbstub, (continued)
- Re: [Qemu-devel] [linux-user] Fixed Qemu crash using Gdbstub, Lionel Landwerlin, 2008/12/12
- [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Jan Kiszka, 2008/12/13
- [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Jan Kiszka, 2008/12/13
- Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Lionel Landwerlin, 2008/12/13
- [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Jan Kiszka, 2008/12/13
- Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Lionel Landwerlin, 2008/12/13
- [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Jan Kiszka, 2008/12/13
- Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Lionel Landwerlin, 2008/12/13
- [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Jan Kiszka, 2008/12/14
- Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub, Lionel Landwerlin, 2008/12/14
- Re: [Qemu-devel] Re: [linux-user] Fixed Qemu crash using Gdbstub,
Lionel Landwerlin <=