Match library name prefixed with sysroot
We enable systemtap probe in glibc recently, and see the following gdb fail,
(gdb) set solib-absolute-prefix /.
...
Stopped due to shared library event:^M
Inferior loaded /./foo/bar/gdb.base/break-probes-solib.so
...
(gdb) FAIL: gdb.base/break-probes.exp: run til our library loads (the program exited)
$binfile_lib is /foo/bar/gdb.base/break-probes-solib.so, but the
sysroot is prefixed in solib.c:solib_find, as comments described:
Global variable GDB_SYSROOT is used as a prefix directory
to search for shared libraries if they have an absolute path.
so the output becomes "/./foo/bar/gdb.base/break-probes-solib.so", which
is still correct. However, the test repeatedly continue the program
and tries to match $binfile_lib, finally, the program exits and the
test fails.
This patch is to adjust the pattern to match $sysroot$binfile_lib
instead of $binfile_lib.
gdb/testsuite:
2014-11-28 Yao Qi <yao@codesourcery.com>
* gdb.base/break-probes.exp: Match library name prefixed with
sysroot.