+2015-09-30 Markus Metzger <markus.t.metzger@intel.com>
+
+ * gdb.btrace/tsx.exp: Consider multiple correct outputs in the record
+ instruction-history test.
+
2015-09-28 Doug Evans <dje@google.com>
* gdb.base/gcore.c (array_func): Add reference to static_array.
gdb_test "next"
# look at the instruction trace
-gdb_test "record instruction-history" [multi_line \
- ".*" \
- "\[0-9\]*\t\\? 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txbegin\[^\\\r\\\n\]*" \
- "\[0-9\]*\t\\? 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
- "\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txend\[^\\\r\\\n\]*" \
- ".*" \
- ]
+set begin_to_end [multi_line \
+ ".*" \
+ "\[0-9\]*\t\\? 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txbegin\[^\\\r\\\n\]*" \
+ "\[0-9\]*\t\\? 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+ "\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txend\[^\\\r\\\n\]*" \
+ ]
+set abort_1 [multi_line \
+ ".*" \
+ "\[0-9\]*\t\\? 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txbegin\[^\\\r\\\n\]*" \
+ "\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+ "\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tret\[^\\\r\\\n\]*" \
+ ]
+set abort_2 [multi_line \
+ ".*" \
+ "\[0-9\]*\t\\? 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\txbegin\[^\\\r\\\n\]*" \
+ "\[0-9\]*\t\\? 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+ "\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
+ "\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tret\[^\\\r\\\n\]*" \
+ ]
+
+set test "speculation indication"
+gdb_test_multiple "record instruction-history" $test {
+ -re "$abort_1.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "$abort_2.*$gdb_prompt $" {
+ pass $test
+ }
+ -re "$begin_to_end.*$gdb_prompt $" {
+ pass $test
+ }
+}