qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v4 08/12] target-lm32: add breakpoint/watchpoint


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL v4 08/12] target-lm32: add breakpoint/watchpoint support
Date: Sat, 1 Feb 2014 18:16:16 +0000

On 20 January 2014 19:34, Michael Walle <address@hidden> wrote:
> This patch adds in-target breakpoint and watchpoint support.

This looks at least superficially OK, but I'm not really familiar
with QEMU's breakpoint/watchpoint support code. RTH: do
you want to have a look over this one?

A style point, since I'm not really able to review for much
else:

> +void lm32_debug_excp_handler(CPULM32State *env)
> +{
> +    CPUBreakpoint *bp;
> +
> +    if (env->watchpoint_hit) {
> +        if (env->watchpoint_hit->flags & BP_CPU) {
> +            env->watchpoint_hit = NULL;
> +            if (check_watchpoints(env)) {
> +                raise_exception(env, EXCP_WATCHPOINT);
> +            } else {
> +                cpu_resume_from_signal(env, NULL);
> +            }
> +        }
> +    } else {
> +        QTAILQ_FOREACH(bp, &env->breakpoints, entry)
> +            if (bp->pc == env->pc) {
> +                if (bp->flags & BP_CPU) {
> +                    raise_exception(env, EXCP_BREAKPOINT);
> +                }
> +                break;
> +            }

Braces around the QTAILQ_FOREACH's body, please.

> +    }
> +}

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]