GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / s390-tdbregs.exp
CommitLineData
618f726f 1# Copyright 2004-2016 Free Software Foundation, Inc.
4ac33720
UW
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
22if { ![istarget s390-*-*] && ![istarget s390x-*-* ] } {
23 verbose "Skipping s390 TDB register tests."
24 return
25}
26
27set testfile "s390-tdbregs"
28set srcfile ${testfile}.c
29set binfile ${objdir}/${subdir}/${testfile}
30
31if { [get_compiler_info] } {
32 return -1
33}
34
35if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
36 executable [list debug]] != "" } {
37 fail "compile failed"
38 return
39}
40
41gdb_exit
42gdb_start
43gdb_reinitialize_dir $srcdir/$subdir
44gdb_load ${binfile}
45
46if { ![runto_main] } then {
47 gdb_suppress_tests
48}
49
50gdb_test_multiple "next" "check for TE support" {
51 -re "Program received signal SIGILL,.*\r\n$gdb_prompt $" {
52 unsupported "No TE support."
53 return
54 }
55 -re "\[0-9\]+.*\r\n$gdb_prompt $" {
56 pass "TE support available"
57 }
58 -re "$gdb_prompt $" {
59 unsupported "No TE support (unknown error)."
60 return
61 }
62}
63
64set crashline [gdb_get_line_number "FAULT"]
65
66gdb_test "print \$tdb0" "\\\$\[0-9\]+ = <unavailable>" "tdb0 unavailable"
67gdb_test "print \$tr0" "\\\$\[0-9\]+ = <unavailable>" "tr0 unavailable"
68gdb_test "next" \
69 "Program received signal SIGSEGV, .*" \
70 "crash in transaction"
71gdb_test "print/x \$tdb0" "\\\$\[0-9\]+ = 0x1.*" "tdb0 available"
72gdb_test "set print symbol-filename" "" "set print symbol-filename"
73gdb_test "print/a \$atia" \
74 "<crash_in_transaction.*:$crashline>" \
75 "ATIA points to crash"
This page took 0.296447 seconds and 4 git commands to generate.