diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7c3fd4cf4cb..9387c686a05 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-15 Tom de Vries + + * gdb.server/solib-list.exp: Handle + 'Load new symbol table from "/lib64/ld-2.26.so"? (y or n)'. + 2020-03-15 Tom de Vries * gdb.base/maint.exp: Use exp_continue in long lines for "maint print diff --git a/gdb/testsuite/gdb.server/solib-list.exp b/gdb/testsuite/gdb.server/solib-list.exp index 5471734e031..6f077c6a664 100644 --- a/gdb/testsuite/gdb.server/solib-list.exp +++ b/gdb/testsuite/gdb.server/solib-list.exp @@ -92,10 +92,23 @@ foreach nonstop { 0 1 } { with_test_prefix "non-stop $nonstop" { {(Are you sure you want to change the file|Load new symbol table from ".*")\? \(y or n\) } "y" set test "target $gdbserver_protocol" + set ok 0 gdb_test_multiple "target $gdbserver_protocol $gdbserver_gdbport" $test { - -re "Remote debugging using .*\r\n$gdb_prompt " { + -re "Remote debugging using" { + set ok 1 + exp_continue + } + -re {.*Load new symbol table from ".*"\? \(y or n\) } { + send_gdb "y\n" answer + exp_continue + } + -re ".*\r\n$gdb_prompt " { # Do not anchor end, there may be more output in non-stop mode. - pass $test + if ($ok) { + pass $test + } else { + fail $test + } } }