binutils-gdb/gdb/testsuite/gdb.btrace/tsx.exp

42 lines
1.4 KiB
Plaintext

# This testcase is part of GDB, the GNU debugger.
#
# Copyright 2015 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if { [skip_btrace_pt_tests] } { return -1 }
if { [skip_tsx_tests] } { return -1 }
# compile and run to main
standard_testfile .c x86-tsx.S
if [prepare_for_testing tsx.exp $testfile "$srcfile $srcfile2" {debug}] {
return -1
}
if ![runto_main] {
return -1
}
# record the test
gdb_test_no_output "record btrace pt"
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\]*" \
".*" \
]