testsuite, gdb.btrace: pass rn-dl-bind.exp with clang
authorMarkus Metzger <markus.t.metzger@intel.com>
Tue, 15 Dec 2020 14:01:21 +0000 (15:01 +0100)
committerMarkus Metzger <markus.t.metzger@intel.com>
Wed, 3 Mar 2021 08:14:47 +0000 (09:14 +0100)
Clang generates slightly different debug information causing
gdb.btrace/rn-dl-bind.exp to fail on its way to the actual test.

Modify the test to remove that dependency.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.btrace/rn-dl-bind.exp

index 1f0941e13e1840d96c044745bcba29422616b327..3ae045af6c4780c764240e48dd13903417f09a6f 100644 (file)
@@ -1,3 +1,8 @@
+2021-03-03  Markus Metzger  <markus.t.metzger@intel.com>
+
+       * gdb.btrace/rn-dl-bind.exp: Replace reverse-step with
+       reverse-continue to breakpoint.
+
 2021-03-03  Markus Metzger  <markus.t.metzger@intel.com>
 
        * gdb.btrace/delta.exp: Remove instruction-history and
index a769db29cf0cb0cd5190ada9df600a4c1dc28e6c..65e445334af4176a0218fcbe67ccb254e7a813ac 100644 (file)
@@ -38,18 +38,28 @@ if ![runto_main] {
 
 # trace the code for the call to test
 gdb_test_no_output "record btrace"
-gdb_test "next" ".*main\.2.*" "next.1"
+gdb_test "next" ".*main\.2.*"
 
 # just dump the function-call-history to help debugging
 gdb_test_no_output "set record function-call-history-size 0"
 gdb_test "record function-call-history /cli 1" ".*"
 
 # check that we can reverse-next and next
-gdb_test "reverse-next" ".*main\.1.*" "reverse-next.1"
-gdb_test "next" ".*main\.2.*" "next.2"
-
-# now go into test and try to reverse-next and next over the library call
-gdb_test "reverse-step" ".*test\.3.*" "reverse-step.1"
-gdb_test "reverse-step" ".*test\.2.*" "reverse-step.2"
-gdb_test "reverse-next" ".*test\.1.*" "reverse-next.2"
-gdb_test "next" ".*test\.2.*" "next.3"
+with_test_prefix "main" {
+    gdb_test "reverse-next" ".*main\.1.*"
+    gdb_test "next" ".*main\.2.*"
+}
+
+# now go into test and try to (reverse-)next over the library call
+#
+# reverse-stepping through the epilogue is not very reliable; depending on
+# debug information we may stop at the closing brace or at the return.
+#
+# instead, run to test
+gdb_breakpoint test {temporary}
+gdb_test "reverse-continue" ".*test\.1.*"
+
+with_test_prefix "test" {
+    gdb_test "next" ".*test\.2.*"
+    gdb_test "reverse-next" ".*test\.1.*"
+}
This page took 0.045052 seconds and 4 git commands to generate.