The recent commit
089197010993b3a5dc50bf882470bab2de696d92 changed the
warnings when GDB reaches the end of the recorded history, and updated
tests to expect the new messages. The pattern used for
gdb.btrace/non-stop.exp, however, was too broad and could cause the
following test result:
...
(gdb) PASS: gdb.btrace/non-stop.exp: no progress: all: thread apply all continue: prompt
^M
Reached end of recorded history; stopping.^M
Following forward execution will be added to history.^M
test (arg=0x0) at /data/vries/gdb/src/gdb/testsuite/gdb.btrace/non-stop.c:30^M
30 return arg; /* bp.2 */^M
^M
Reached end of recorded history; stopping.^M
Following forward execution will be added to history.^M
test (arg=0x0) at /data/vries/gdb/src/gdb/testsuite/gdb.btrace/non-stop.c:30^M
30 return arg; /* bp.2 */^M
PASS: gdb.btrace/non-stop.exp: no progress: all: thread apply all continue: thread 0
FAIL: gdb.btrace/non-stop.exp: no progress: all: thread apply all continue: thread 1 (timeout)
...
This happens because the pattern looks like one of these 2:
"Reached end of recorded.*Backwards execution.*"
"Reached end of recorded.*Following forward.*"
What seems to have happened is that all the output came at once, and
most of it was consumed by the first '.*' pattern when checking for
thread 0, so there was no output left for checking thread 1. This commit
fixes that by making the expected outputs more exact.
I also fixed the whitespace errors in gdb_cont_to_no_history_backwards
that pre-dated the commit above, since I was already touching that proc.
Approved-By: Tom de Vries <tdevries@suse.de>
proc gdb_cont_to_no_history_backward { threads cmd nthreads } {
gdb_cont_to $threads $cmd \
- [multi_line \
- "Reached end of recorded.*Backward execution.*" \
- "\[^\\\r\\\n\]*" \
- "\[^\\\r\\\n\]*" \
- ] \
- $nthreads
+ [multi_line \
+ "Reached end of recorded history; stopping\." \
+ "Backward execution from here not possible\." \
+ "\[^\\\r\\\n\]*" \
+ "\[^\\\r\\\n\]*" \
+ ] \
+ $nthreads
}
proc gdb_cont_to_no_history_forward { threads cmd nthreads } {
gdb_cont_to $threads $cmd \
[multi_line \
- "Reached end of recorded.*Following forward.*" \
+ "Reached end of recorded history; stopping\." \
+ "Following forward execution will be added to history\." \
"\[^\\\r\\\n\]*" \
"\[^\\\r\\\n\]*" \
] \