mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-20 18:08:24 +08:00
[gdb/testsuite] Fix gdb.ada/interface.exp with gcc-9
When running test-case gdb.ada/interface.exp with gcc-9, we run into: ... (gdb) info locals^M s = (x => 1, y => 2, w => 3, h => 4)^M r = (x => 1, y => 2, w => 3, h => 4)^M (gdb) FAIL: gdb.ada/interface.exp: info locals ... The failure is caused by the regexp expecting variable r followed by variable s. Fix this by allowing variable s followed by variable r as well. Tested on x86_64-linux.
This commit is contained in:
@ -34,9 +34,9 @@ gdb_test "print r" \
|
||||
gdb_test "print s" \
|
||||
"= \\(x => 1, y => 2, w => 3, h => 4\\)"
|
||||
|
||||
set r_re "r = \[^\r\n\]*"
|
||||
set s_re "s = \[^\r\n\]*"
|
||||
set cmd "info locals"
|
||||
gdb_test $cmd \
|
||||
[multi_line \
|
||||
$cmd \
|
||||
"r = \[^\r\n\]*" \
|
||||
"s = \[^\r\n\]*"]
|
||||
set re1 [multi_line $cmd $r_re $s_re]
|
||||
set re2 [multi_line $cmd $s_re $r_re]
|
||||
gdb_test $cmd "(?:$re1|$re2)"
|
||||
|
Reference in New Issue
Block a user