This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix wp-replication.exp for targets that provide only 1 hw watchpoint
- From: Luis Machado <lgustavo at codesourcery dot com>
- To: Edjunior Barbosa Machado <emachado at linux dot vnet dot ibm dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 24 May 2013 09:32:48 +0200
- Subject: Re: [PATCH] Fix wp-replication.exp for targets that provide only 1 hw watchpoint
- References: <1369365909-14746-1-git-send-email-emachado at linux dot vnet dot ibm dot com>
- Reply-to: lgustavo at codesourcery dot com
Hi,
On 05/24/2013 05:25 AM, Edjunior Barbosa Machado wrote:
(sorry, my previous message got truncated. Resending...)
Hi,
current wp-replication.exp testcase counts 2 hw watchpoints even when the target
provides only 1 hw watch, resulting in several unexpected errors. Successfully
tested on x86 (with 4 hw watchpoints available) and ppc64 server (with 1 hw
watch), this patch intends to fix this issue. Ok?
I wonder why it is counting one more watchpoint. Is it not matching the
output in the exit block here?
gdb_test_multiple "continue" "watchpoint created successfully" {
-re ".*Breakpoint 2, empty_cycle \\(\\).*$gdb_prompt $" {
incr hwatch_count
}
-re ".*Could not insert hardware watchpoint.*$gdb_prompt $" {
set done 1
break
}
}
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index 8927a43..f73b763 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -78,6 +78,10 @@ while { $done == 0 } {
}
}
+ if { $done == 1 } {
+ break
+ }
+
gdb_test_multiple "continue" "watchpoint created successfully" {
-re ".*Breakpoint 2, empty_cycle \\(\\).*$gdb_prompt $" {
incr hwatch_count
The additional if block seems to accomplish what the upcoming
gdb_test_multiple block does. If it is really a matching problem, it
seems we can fix it in that block instead of a special-case conditional.
Thanks,
Luis