Skip to content

Commit 6e19544

Browse files
committed
Fix latent bug in DWARF test case
On my branch that replaces the DWARF psymtab reader, dw2-stack-boundary.exp started failing. However, when I look at the output in gdb.log, it is correct: file /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.dwarf2/dw2-stack-boundary/dw2-stack-boundary Reading symbols from /home/tromey/gdb/build/gdb/testsuite/outputs/gdb.dwarf2/dw2-stack-boundary/dw2-stack-boundary... During symbol reading: location description stack overflow During symbol reading: location description stack underflow What happens to cause the failure is that the two branches in gdb_test_multiple appear in this order: -re "\r\nDuring symbol reading: location description stack underflow" { [...] -re "\r\nDuring symbol reading: location description stack overflow" { The first one will match the above, without causing the second one to ever match -- leading to a spurious failure. Anchoring the regexps seems to fix the problem, and works for the current gdb as well.
1 parent 2a8f1f4 commit 6e19544

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ gdb_test_multiple "file $binfile" "file command" {
4444
-re "\r\nReading symbols from \[^\r\n\]*\\.\\.\\." {
4545
exp_continue
4646
}
47-
-re "\r\nDuring symbol reading: location description stack underflow" {
47+
-re "^\r\nDuring symbol reading: location description stack underflow" {
4848
set w1 1
4949
exp_continue
5050
}
51-
-re "\r\nDuring symbol reading: location description stack overflow" {
51+
-re "^\r\nDuring symbol reading: location description stack overflow" {
5252
set w2 1
5353
exp_continue
5454
}

0 commit comments

Comments
 (0)