aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-11-28 11:21:48 +0800
committerYao Qi <yao@codesourcery.com>2014-11-28 11:21:48 +0800
commit10e79639cc08c050b8fa97c0a5af102683a11e3c (patch)
tree06e8bb14a6d4f28e20db3c672e0e54cdccefbbd6 /gdb/testsuite
parente87e47787eb22622ddd9e07b561486e1c0e8cbf8 (diff)
downloadgdb-10e79639cc08c050b8fa97c0a5af102683a11e3c.zip
gdb-10e79639cc08c050b8fa97c0a5af102683a11e3c.tar.gz
gdb-10e79639cc08c050b8fa97c0a5af102683a11e3c.tar.bz2
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/break-probes.exp10
2 files changed, 14 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 16fa87d..32f66c8 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-28 Yao Qi <yao@codesourcery.com>
+
+ * gdb.base/break-probes.exp: Match library name prefixed with
+ sysroot.
+
2014-11-27 Simon Marchi <simon.marchi@ericsson.com>
* gdb.python/py-linetable.exp: Escape properly sorted(fset)
diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp
index e25ea91..77fe732 100644
--- a/gdb/testsuite/gdb.base/break-probes.exp
+++ b/gdb/testsuite/gdb.base/break-probes.exp
@@ -58,13 +58,21 @@ gdb_test_multiple "bt" $test {
}
if { $using_probes } {
+ set sysroot ""
+ set test "show sysroot"
+ gdb_test_multiple $test $test {
+ -re "The current system root is \"(.*)\"\..*${gdb_prompt} $" {
+ set sysroot $expect_out(1,string)
+ }
+ }
+
# Run til it loads our library
set test "run til our library loads"
set not_loaded_library 1
while { $not_loaded_library } {
set not_loaded_library 0
gdb_test_multiple "c" $test {
- -re "Inferior loaded $binfile_lib\\M.*$gdb_prompt $" {
+ -re "Inferior loaded $sysroot$binfile_lib\\M.*$gdb_prompt $" {
pass $test
}
-re "Stopped due to shared library event\\M.*$gdb_prompt $" {