aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/watchpoint.exp
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2012-08-01 13:02:41 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2012-08-01 13:02:41 +0000
commitb62e2b271b25eafdafdb3bafd654bf69b72b6c95 (patch)
tree95fded1256fb452941824115a0df2f6065967da4 /gdb/testsuite/gdb.base/watchpoint.exp
parenta967a8512afc86ef0adce0b718de5d86f53153f7 (diff)
downloadgdb-b62e2b271b25eafdafdb3bafd654bf69b72b6c95.zip
gdb-b62e2b271b25eafdafdb3bafd654bf69b72b6c95.tar.gz
gdb-b62e2b271b25eafdafdb3bafd654bf69b72b6c95.tar.bz2
gdbserver/ChangeLog:
* linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish between unsupported TYPE and unimplementable ADDR/LEN combination. (arm_insert_point): Act on new return value. testsuite/ChangeLog: * gdb.base/watchpoint.exp (test_wide_location_1): Expect software watchpoints on ARM. When expecting software watchpoints, tolerate (remote) targets that report unsupported hardware watchpoint only at continue time. (test_wide_location_2): Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/watchpoint.exp')
-rw-r--r--gdb/testsuite/gdb.base/watchpoint.exp44
1 files changed, 36 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp
index 2941fbf..a461cb2 100644
--- a/gdb/testsuite/gdb.base/watchpoint.exp
+++ b/gdb/testsuite/gdb.base/watchpoint.exp
@@ -603,13 +603,15 @@ proc test_watch_location {} {
proc test_wide_location_1 {} {
global no_hw
+ global gdb_prompt
# This test watches two words on most 32-bit ABIs, and one word on
# most 64-bit ABIs.
# Platforms where the target can't watch such a large region
# should clear hw_expected below.
- if { $no_hw || [target_info exists gdb,no_hardware_watchpoints] } {
+ if { $no_hw || [target_info exists gdb,no_hardware_watchpoints]
+ || [istarget arm*-*-*] } {
set hw_expected 0
} else {
set hw_expected 1
@@ -625,9 +627,21 @@ proc test_wide_location_1 {} {
"continue with watch foo2"
} else {
gdb_test "watch foo2" "atchpoint .*: .*" "watch foo2"
- gdb_test "continue" \
- "Continuing.*\[Ww\]atchpoint .*: .*New value = \\\{val = \\\{0, 11\\\}\\\}.*" \
- "continue with watch foo2"
+ set test "continue with watch foo2"
+ gdb_test_multiple "cont" $test {
+ -re "Continuing.*\[Ww\]atchpoint .*: .*New value = \\\{val = \\\{0, 11\\\}\\\}.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Could not insert hardware breakpoints:.*You may have requested too many hardware breakpoints/watchpoints.*$gdb_prompt $" {
+ # This may happen with remote targets that support
+ # hardware watchpoints. We only find out the
+ # watchpoint was too large, for example, at insert
+ # time. If GDB is ever adjusted to downgrade the
+ # watchpoint automatically in this case, this match
+ # should be removed.
+ pass $test
+ }
+ }
}
gdb_test_no_output "delete \$bpnum" "delete watch foo2"
@@ -635,13 +649,15 @@ proc test_wide_location_1 {} {
proc test_wide_location_2 {} {
global no_hw
+ global gdb_prompt
# This test watches four words on most 32-bit ABIs, and two words
# on 64-bit ABIs.
# Platforms where the target can't watch such a large region
# should clear hw_expected below.
- if { $no_hw || [target_info exists gdb,no_hardware_watchpoints] } {
+ if { $no_hw || [target_info exists gdb,no_hardware_watchpoints]
+ || [istarget arm*-*-*] } {
set hw_expected 0
} else {
set hw_expected 1
@@ -657,9 +673,21 @@ proc test_wide_location_2 {} {
"continue with watch foo4"
} else {
gdb_test "watch foo4" "atchpoint .*: .*" "watch foo4"
- gdb_test "continue" \
- "Continuing.*\[Ww\]atchpoint .*: .*New value = \\\{val = \\\{0, 0, 0, 33\\\}\\\}.*" \
- "continue with watch foo4"
+ set test "continue with watch foo4"
+ gdb_test_multiple "cont" $test {
+ -re "Continuing.*\[Ww\]atchpoint .*: .*New value = \\\{val = \\\{0, 0, 0, 33\\\}\\\}.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "Could not insert hardware breakpoints:.*You may have requested too many hardware breakpoints/watchpoints.*$gdb_prompt $" {
+ # This may happen with remote targets that support
+ # hardware watchpoints. We only find out the
+ # watchpoint was too large, for example, at insert
+ # time. If GDB is ever adjusted to downgrade the
+ # watchpoint automatically in this case, this match
+ # should be removed.
+ pass $test
+ }
+ }
}
gdb_test_no_output "delete \$bpnum" "delete watch foo4"