When running test-case gdb.server/solib-list.exp with target board
remote-gdbserver-on-localhost, I run into:
...
(gdb) set solib-search-path $outputs/gdb.server/solib-list^M
(gdb) PASS: gdb.server/solib-list.exp: non-stop 0: \
set solib-search-path $outputs/gdb.server/solib-list
PATH: gdb.server/solib-list.exp: non-stop 0: \
set solib-search-path $outputs/gdb.server/solib-list
...
This is due to this code in gdb_load_shlib:
...
gdb_test "set solib-search-path [file dirname $file]" "" ""
...
Fix this by setting an explicit test name.
Tested on x86_64-linux, with native and target boards
remote-gdbserver-on-localhost, native-gdbserver and native-extended-gdbserver.
# We could set this even when not testing remotely, but a user
# generally won't set it unless necessary. In order to make the tests
# more like the real-life scenarios, we don't set it for local testing.
- gdb_test "set solib-search-path [file dirname $file]" "" ""
+ gdb_test "set solib-search-path [file dirname $file]" "" \
+ "set solib-search-path for [file tail $file]"
}
return $dest