From: Peter Maydell <peter.maydell@linaro.org>
To: Sergey Fedorov <serge.fdrv@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for singlestep enabled
Date: Mon, 2 Nov 2015 18:28:38 +0000 [thread overview]
Message-ID: <CAFEAcA8iUzhRhCfYtFiZOpKpS-udqRFGmOX-TXLV_OAWH5tdxA@mail.gmail.com> (raw)
In-Reply-To: <1446486668-2133-1-git-send-email-serge.fdrv@gmail.com>
On 2 November 2015 at 17:51, Sergey Fedorov <serge.fdrv@gmail.com> wrote:
> CPU singlestep is done by generating a debug internal exception. Do not
> raise a real CPU exception in case of singlestepping.
>
> Signed-off-by: Sergey Fedorov <serge.fdrv@gmail.com>
> ---
> target-arm/op_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c
> index 7929c71..67d9ffb 100644
> --- a/target-arm/op_helper.c
> +++ b/target-arm/op_helper.c
> @@ -909,7 +909,7 @@ void arm_debug_excp_handler(CPUState *cs)
> uint64_t pc = is_a64(env) ? env->pc : env->regs[15];
> bool same_el = (arm_debug_target_el(env) == arm_current_el(env));
>
> - if (cpu_breakpoint_test(cs, pc, BP_GDB)) {
> + if (cs->singlestep_enabled || cpu_breakpoint_test(cs, pc, BP_GDB)) {
> return;
> }
So I think this will mean that if we're gdbstub-single-stepping then
an architectural breakpoint on the insn we're stepping won't fire.
Does using a test
if (!cpu_breakpoint_test(cs, pc, BP_CPU)) {
return;
}
fix the singlestep bug too? If so I think it would probably be
preferable.
thanks
-- PMM
next prev parent reply other threads:[~2015-11-02 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-02 17:51 [Qemu-devel] [PATCH] target-arm: Fix arm_debug_excp_handler() for singlestep enabled Sergey Fedorov
2015-11-02 18:28 ` Peter Maydell [this message]
2015-11-03 9:02 ` Sergey Fedorov
2015-11-03 9:23 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFEAcA8iUzhRhCfYtFiZOpKpS-udqRFGmOX-TXLV_OAWH5tdxA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=serge.fdrv@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).