From: Sergey Fedorov <serge.fdrv@gmail.com>
To: qemu-devel@nongnu.org
Cc: Sergey Fedorov <serge.fdrv@gmail.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PATCH v2 1/2] target-arm: Fix GDB breakpoint handling
Date: Mon, 28 Sep 2015 13:07:49 +0300 [thread overview]
Message-ID: <1443434870-5702-2-git-send-email-serge.fdrv@gmail.com> (raw)
In-Reply-To: <1443434870-5702-1-git-send-email-serge.fdrv@gmail.com>
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 <serge.fdrv@gmail.com>
---
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;
+ }
+ }
+
if (check_breakpoints(cpu)) {
bool same_el = (arm_debug_target_el(env) == arm_current_el(env));
if (extended_addresses_enabled(env)) {
--
1.9.1
next prev parent reply other threads:[~2015-09-28 10:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-28 10:07 [Qemu-devel] [PATCH v2 0/2] target-arm: Fix breakpoint handling Sergey Fedorov
2015-09-28 10:07 ` Sergey Fedorov [this message]
2015-10-08 18:20 ` [Qemu-devel] [PATCH v2 1/2] target-arm: Fix GDB " Peter Maydell
2015-09-28 10:07 ` [Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU " Sergey Fedorov
2015-10-08 18:40 ` Peter Maydell
2015-10-09 13:53 ` Sergey Fedorov
2015-10-09 14:00 ` Peter Maydell
2015-10-09 14:03 ` Sergey Fedorov
2015-10-09 13:59 ` Sergey Fedorov
2015-10-09 14:04 ` Peter Maydell
2015-10-09 15:55 ` Sergey Fedorov
2015-10-09 15:59 ` Peter Maydell
2015-10-09 16:31 ` Sergey Fedorov
2015-10-12 12:41 ` Sergey Fedorov
2015-10-12 13:22 ` 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=1443434870-5702-2-git-send-email-serge.fdrv@gmail.com \
--to=serge.fdrv@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).