]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.arch/s390-tdbregs.exp
aarch64: Fix the hyphenated disassembly comment.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / s390-tdbregs.exp
1 # Copyright 2004-2024 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # Please email any bugs, comments, and/or additions to this file to:
17 # bug-gdb@gnu.org
18
19 # This file is part of the gdb testsuite.
20
21 require {is_any_target s390-*-* s390x-*-*}
22
23 standard_testfile .c
24
25 # The test case assumes that no FP- or vector instructions occur within
26 # the transaction. Thus tell the compiler to use soft float, so it
27 # doesn't emit them. Some GCC versions may otherwise do so, and an
28 # endless loop would result.
29 if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
30 [list "debug" "additional_flags=-msoft-float"]] } {
31 return -1
32 }
33
34 if {![runto_main]} {
35 return 0
36 }
37
38 gdb_test_multiple "next" "check for TE support" {
39 -re "Program received signal SIGILL,.*\r\n$gdb_prompt $" {
40 unsupported "no TE support."
41 return
42 }
43 -re "\[0-9\]+.*\r\n$gdb_prompt $" {
44 pass "TE support available"
45 }
46 -re "$gdb_prompt $" {
47 unsupported "no TE support (unknown error)."
48 return
49 }
50 }
51
52 set crashline [gdb_get_line_number "FAULT"]
53
54 gdb_test "print \$tdb0" "\\\$\[0-9\]+ = <unavailable>" "tdb0 unavailable"
55 gdb_test "print \$tr0" "\\\$\[0-9\]+ = <unavailable>" "tr0 unavailable"
56 gdb_test "next" \
57 "Program received signal SIGSEGV, .*" \
58 "crash in transaction"
59 gdb_test "print/x \$tdb0" "\\\$\[0-9\]+ = 0x1.*" "tdb0 available"
60 gdb_test "set print symbol-filename" "" "set print symbol-filename"
61 gdb_test "print/a \$atia" \
62 "<crash_in_transaction.*:$crashline>" \
63 "ATIA points to crash"