[binutils-gdb] testsuite, gdb.btrace: adjust expected source line in non-stop.exp
Markus Metzger
mmetzger@sourceware.org
Wed Mar 3 08:20:54 GMT 2021
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=32c5299909162c116728eff2580fc5c3e707af6d
commit 32c5299909162c116728eff2580fc5c3e707af6d
Author: Markus Metzger <markus.t.metzger@intel.com>
Date: Thu Dec 17 10:28:18 2020 +0100
testsuite, gdb.btrace: adjust expected source line in non-stop.exp
In gdb.btrace/non-stop.exp, we hard-code expected source lines assuming we
know how they would match to the recorded trace. Despite the fact that we
should really have been using an assembly source, the assumptions work
pretty well.
With clang-6 -m32, we found a case where the assumptions do not hold.
Adjust the expected source lines a little bit to cover that case, as well.
Should we run into more cases like this, we will have to switch to an
assembly source file.
Diff:
---
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.btrace/non-stop.exp | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 12ee7b93064..970d6fef727 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+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>
* gdb.btrace/stepi.exp: Add {} options to prepare_for_testing.
diff --git a/gdb/testsuite/gdb.btrace/non-stop.exp b/gdb/testsuite/gdb.btrace/non-stop.exp
index 40cced7a8bb..e509d65d660 100644
--- a/gdb/testsuite/gdb.btrace/non-stop.exp
+++ b/gdb/testsuite/gdb.btrace/non-stop.exp
@@ -111,10 +111,10 @@ gdb_test "thread apply all info rec" ".*"
gdb_test "info threads" ".*"
with_test_prefix "navigate" {
- gdb_test "thread apply 1 record goto 2" "$loop_line"
+ gdb_test "thread apply 1 record goto 3" "$loop_line"
gdb_test "thread apply 2 record goto 4" "$loop_line"
gdb_test "thread apply 1 info record" \
- ".*Replay in progress\. At instruction 2\." "thread 1 at insn 2"
+ ".*Replay in progress\. At instruction 3\." "thread 1 at insn 3"
gdb_test "thread apply 2 info record" \
".*Replay in progress\. At instruction 4\." "thread 2 at insn 4"
More information about the Gdb-cvs
mailing list