This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands.
- From: Andreas Arnez <arnez at linux dot vnet dot ibm dot com>
- To: Pedro Alves <palves at redhat dot com>, Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 26 Jun 2014 17:21:08 +0200
- Subject: Re: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands.
- Authentication-results: sourceware.org; auth=none
- References: <87pphvhj6i dot fsf at br87z6lw dot de dot ibm dot com> <53AC2AE6 dot 7060401 at redhat dot com>
On Thu, Jun 26 2014, Pedro Alves wrote:
>> gdb/testsuite/
>> * gdb.base/watchpoint-reuse-slot.exp: Handle the case that the
>> target lacks support for watch, awatch, rwatch, or hbreak.
>
> s/watch, // , I think, as "watch" falls back to software
> watchpoints.
OK.
> Patch is OK.
Good, thanks for reviewing.
Uli, would you push this? Thanks :-)
-- >8 --
Subject: [PATCH] watchpoint-reuse-slot.exp: Correctly skip unsupported commands.
The test case "watchpoint-reuse-slot.exp" yields a lot of failures on
s390/s390x: all instances of awatch, rwatch, and hbreak are performed
even though they aren't supported on these targets. This is because
the test case ignores non-support error messages when probing for
support of these commands, like:
(gdb) rwatch buf.byte[0]
Target does not support this type of hardware watchpoint.
The patch adds handling for this case in the appropriate
gdb_test_multiple invocations.
gdb/testsuite/
* gdb.base/watchpoint-reuse-slot.exp: Handle the case that the
target lacks support for awatch, rwatch, or hbreak.
---
gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
index aa30398..46bfd56 100644
--- a/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp
@@ -103,6 +103,9 @@ foreach cmd {"watch" "awatch" "rwatch"} {
-re "You may have requested too many.*$gdb_prompt $" {
unsupported $test
}
+ -re "Target does not support.*$gdb_prompt $" {
+ unsupported $test
+ }
-re "$gdb_prompt $" {
pass $test
lappend cmds $cmd
@@ -115,7 +118,10 @@ foreach cmd {"watch" "awatch" "rwatch"} {
set test "hbreak"
gdb_test_multiple "hbreak main" $test {
-re "You may have requested too many.*$gdb_prompt $" {
- pass $test
+ unsupported $test
+ }
+ -re "No hardware breakpoint support.*$gdb_prompt $" {
+ unsupported $test
}
-re "$gdb_prompt $" {
pass $test
--
1.8.4.2