@@ -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"
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(-)