[PATCH][gdb/testsuite] Fix gdb.btrace/tsx.exp on system with tsx disabled in microcode
Metzger, Markus T
markus.t.metzger@intel.com
Mon Jul 12 14:35:59 GMT 2021
Hello Tom,
> diff --git a/gdb/testsuite/gdb.btrace/tsx.exp b/gdb/testsuite/gdb.btrace/tsx.exp
> index ccde1ea807e..66f6305e50a 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\]+ <test\\+\[0-9\]+>:\tmov\[^\\\r\\\n\]*" \
> "\[0-9\]*\t 0x\[0-9a-f\]+ <test\\+\[0-9\]+>:\tret\[^\\\r\\\n\]*" \
> ]
> +set abort_3 \
> + [multi_line \
> + "$decimal\t $hex <main\\+$decimal>:\t\[^\\\r\\\n\]*" \
> + "$decimal\t $hex <test\\+$decimal>:\tmov\[^\\\r\\\n\]*" \
> + "$decimal\t $hex <test\\+$decimal>:\tret\[^\\\r\\\n\]*"]
>
> 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
> + }
> -re "$begin_to_end.*$gdb_prompt $" {
> pass $test
> }
We allow (and require) a single instruction in main. That works if we stopped
directly at the call. I don't think we can guarantee that.
In the other patterns, I put .* in front to ignore any compiler-generated
code prior to the actual test.
Regards,
Markus.
Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
More information about the Gdb-patches
mailing list