aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMarkus Metzger <markus.t.metzger@intel.com>2021-01-13 16:41:43 +0100
committerMarkus Metzger <markus.t.metzger@intel.com>2021-03-03 09:18:58 +0100
commit823337810468cc5775d0ebd645399756c86453d3 (patch)
tree072afd01c4f758c4f6cf1bb40a89f0bde1d7e08b /gdb
parent32c5299909162c116728eff2580fc5c3e707af6d (diff)
downloadbinutils-823337810468cc5775d0ebd645399756c86453d3.zip
binutils-823337810468cc5775d0ebd645399756c86453d3.tar.gz
binutils-823337810468cc5775d0ebd645399756c86453d3.tar.bz2
gdb, testsuite: enforce lazy binding for gdb.btrace/rn-dl-bind.exp
In gdb.btrace/rn-dl-bind.exp we test that we can reverse-step over recorded dynamic linking. The test covers specific behaviour to support _dl_runtime_resolve calling the resolved function by returning to it. This would normally mess up stepping as we'd end up with backtraces that contain the same functions but different frame ids. Since GDB needs to recognize a return from _dl_runtime_resolve, the test only passes when debug information for _dl_runtime_resolve is available. The test requires that symbols are bound lazily. Otherwise, we won't record dynamic linking and the test will be fairly pointless. Recent GCC pass -z now by default to bind symbols eagerly. Add -z lazy to the test's ldflags to enforce lazy binding.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.btrace/rn-dl-bind.exp3
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 970d6fe..e861ec1 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2021-03-03 Markus Metzger <markus.t.metzger@intel.com>
+ * gdb.btrace/rn-dl-bind.exp: Add ldflags=-Wl,-z,lazy.
+
+2021-03-03 Markus Metzger <markus.t.metzger@intel.com>
+
* gdb.btrace/non-stop.exp: Adjust expected source lines.
2021-03-03 Markus Metzger <markus.t.metzger@intel.com>
diff --git a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
index 65e4453..204e880 100644
--- a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
+++ b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp
@@ -27,7 +27,8 @@ if { [skip_btrace_tests] } {
}
standard_testfile
-if [prepare_for_testing "failed to prepare" $testfile $srcfile {c++ debug}] {
+if [prepare_for_testing "failed to prepare" $testfile $srcfile \
+ {c++ debug ldflags=-Wl,-z,lazy}] {
return -1
}