[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] target-arm: Fix GDB breakpoint handling
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] target-arm: Fix GDB breakpoint handling |
Date: |
Thu, 8 Oct 2015 19:20:44 +0100 |
On 28 September 2015 at 11:07, Sergey Fedorov <address@hidden> wrote:
> GDB breakpoints have higher priority so they have to be checked first.
> Should GDB breakpoint match, just return from the debug exception
> handler.
>
> Signed-off-by: Sergey Fedorov <address@hidden>
> ---
> target-arm/op_helper.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
> index 1425a1d..1d4d8cb 100644
> --- a/target-arm/op_helper.c
> +++ b/target-arm/op_helper.c
> @@ -897,6 +897,15 @@ void arm_debug_excp_handler(CPUState *cs)
> }
> }
> } else {
> + CPUBreakpoint *bp;
> + uint64_t pc = is_a64(env) ? env->pc : env->regs[15];
> +
> + QTAILQ_FOREACH(bp, &cs->breakpoints, entry) {
> + if (bp->pc == pc && !(bp->flags & BP_CPU)) {
> + return;
> + }
> + }
> +
In current master you can write this more simply as
if (cpu_breakpoint_test(cs, pc, BP_GDB)) {
return;
}
since rth's patchset introduced that utility function.
thanks
-- PMM
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v2 1/2] target-arm: Fix GDB breakpoint handling,
Peter Maydell <=