On 7/12/21 1:54 PM, Metzger, Markus T wrote: > Hello Tom, > > >> diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp >> index ccde1ea807e..7f96313f1b1 100644 >> --- a/gdb/testsuite/gdb.btrace/tsx.exp >> +++ b/gdb/testsuite/gdb.btrace/tsx.exp >> @@ -59,6 +59,11 @@ set abort_2 [multi_line \ >> "\[0-9\]*\t 0x\[0-9a-f\]+ :\tmov\[^\\\r\\\n\]*" \ >> "\[0-9\]*\t 0x\[0-9a-f\]+ :\tret\[^\\\r\\\n\]*" \ >> ] >> +set abort_3 \ >> + [multi_line \ >> + "$decimal\t $hex :\tcall\[^\\\r\\\n\]*" \ >> + "$decimal\t $hex :\tmov\[^\\\r\\\n\]*" \ >> + "$decimal\t $hex :\tret\[^\\\r\\\n\]*"] > > The patterns do not include the call since this is compiler-generated. The actual > TSX test is written in assembly so we know the instructions. > I see. Fixed by not requiring a specific instruction. > >> set test "speculation indication" >> gdb_test_multiple "record instruction-history" $test { >> @@ -68,6 +73,9 @@ gdb_test_multiple "record instruction-history" $test { >> -re "$abort_2.*$gdb_prompt $" { >> pass $test >> } >> + -re -wrap "$abort_3" { >> + pass $gdb_test_name >> + } > > Does this '-wrap' add ".*$gdb_prompt $"? > > Note that we need the ".*" after the pattern since this code is compiler-generated > and we don't really know when we will stop after returning from test (). The -wrap processes the pattern in exactly the same way as gdb_test does: ... if { $wrap_pattern } { # Wrap subst_item as is done for the gdb_test PATTERN # argument. lappend $current_list \ "\[\r\n\]*(?:$subst_item)\[\r\n\]+$gdb_prompt $" set wrap_pattern 0 } else { ... After running with clang, I ran into the FAIL you anticipated, which is indeed fixed by adding .* in the pattern. Updated patch attached. OK for trunk? Thanks, - Tom