testsuite: Range stepping and non-stop mode

The range-stepping tests fail with "maint set target-non-stop on" mode
because exec_cmd_expect_vCont_count doesn't know that in non-stop
mode, vCont's reply is simply "OK".

gdb/testsuite/ChangeLog:
2015-11-30  Pedro Alves  <palves@redhat.com>

	* lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
	Handle non-stop mode vCont replies.
This commit is contained in:
Pedro Alves
2015-11-30 16:05:23 +00:00
parent a681f9c913
commit 04bf20c568
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2015-11-30 Pedro Alves <palves@redhat.com>
* lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
Handle non-stop mode vCont replies.
2015-11-30 Pedro Alves <palves@redhat.com> 2015-11-30 Pedro Alves <palves@redhat.com>
* gdb.base/dprintf-non-stop.exp: Use build_executable instead of * gdb.base/dprintf-non-stop.exp: Use build_executable instead of

View File

@ -25,12 +25,15 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_r } {
set r_counter 0 set r_counter 0
set s_counter 0 set s_counter 0
set ret 1 set ret 1
# We either get a stop reply in all-stop mode, or an OK in
# non-stop mode.
set vcont_reply "(T\[\[:xdigit:\]\]\[\[:xdigit:\]\]|OK)"
gdb_test_multiple $cmd $test { gdb_test_multiple $cmd $test {
-re "vCont;s\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" { -re "vCont;s\[^\r\n\]*Packet received: $vcont_reply" {
incr s_counter incr s_counter
exp_continue exp_continue
} }
-re "vCont;r\[^\r\n\]*Packet received: T\[\[:xdigit:\]\]\[\[:xdigit:\]\]" { -re "vCont;r\[^\r\n\]*Packet received: $vcont_reply" {
incr r_counter incr r_counter
exp_continue exp_continue
} }