From: Yao Qi <qiyaoltc@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] watchpoint-reuse-slot.exp: skip when requesting two breakpoints in one slot on aarch64
Date: Fri, 13 Mar 2015 14:41:00 -0000 [thread overview]
Message-ID: <1426257692-30461-2-git-send-email-qiyaoltc@gmail.com> (raw)
In-Reply-To: <1426257692-30461-1-git-send-email-qiyaoltc@gmail.com>
From: Yao Qi <yao.qi@linaro.org>
watchpoint-reuse-slot.exp sets two hardware breakpoints in contiguous
address to reuse one debug register. However, requested address for
breakpoint should be 4-byte aligned on aarch64, so it is impossible
to request two hardware breakpoints and use one debug register. This
patch is to skip the test in the case on aarch64-linux. Since arm
has Thumb mode, in which instruction address can be 2-byte aligned,
more thoughts are needed for arm in my next step.
gdb/testsuite:
2015-03-13 Yao Qi <yao.qi@linaro.org>
* gdb.base/watchpoint-reuse-slot.exp: Skip tests when two
breakpoints are requested on aarch64-linux.
---
gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
index df6eeb6..c646f22 100644
--- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
@@ -178,10 +178,18 @@ foreach always_inserted {"off" "on" } {
foreach cmd2 $cmds {
for {set width 1} {$width < 4} {incr width} {
- if {$cmd1 == "hbreak" && $cmd2 == "hbreak" && $width > 1} {
- # hbreak ignores WIDTH, no use testing more than
- # once.
- continue
+ if {$cmd1 == "hbreak" && $cmd2 == "hbreak"} {
+ if {$width > 1} {
+ # hbreak ignores WIDTH, no use testing more than
+ # once.
+ continue
+ }
+
+ if { [istarget "aarch64*-*-linux*"] } {
+ # The address for breakpoint should be 4-byte
+ # aligned, so can't reuse slot.
+ continue
+ }
}
if {($cmd1 == "hbreak" && $cmd2 != "hbreak"
--
1.9.1
next prev parent reply other threads:[~2015-03-13 14:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 14:41 [PATCH 1/2] watchpoint-reuse-slot.exp: skip some tests on targets have different wp and bp registers Yao Qi
2015-03-13 14:41 ` Yao Qi [this message]
2015-03-16 12:35 ` [PATCH 2/2] watchpoint-reuse-slot.exp: skip when requesting two breakpoints in one slot on aarch64 Pedro Alves
2015-03-16 14:10 ` Yao Qi
2015-03-16 12:35 ` [PATCH 1/2] watchpoint-reuse-slot.exp: skip some tests on targets have different wp and bp registers Pedro Alves
2015-03-16 14:01 ` Yao Qi
2015-03-16 15:23 ` Pedro Alves
2015-03-16 16:37 ` Yao Qi
2015-03-16 16:55 ` Pedro Alves
2015-03-16 17:34 ` Yao Qi
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=1426257692-30461-2-git-send-email-qiyaoltc@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.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