]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.reverse/s390-mvcle.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.reverse / s390-mvcle.exp
CommitLineData
1d506c26 1# Copyright (C) 2015-2024 Free Software Foundation, Inc.
566c56c9
MK
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#
17# This test tests s390 MVCLE opcode for reverse execution.
18#
19
73c06197 20require supports_reverse {istarget "s390*-*-*"}
566c56c9
MK
21
22standard_testfile
23
5b362f04 24if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
566c56c9
MK
25 return -1
26}
27
50441f0f 28runto_main
566c56c9
MK
29
30if [supports_process_record] {
31 # Activate process record/replay
9f058c10 32 gdb_test_no_output "record" "turn on process record"
566c56c9
MK
33}
34
35gdb_test "break marker1" \
36 "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
37 "set breakpoint at marker1"
38
39gdb_test "break marker2" \
40 "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
41 "set breakpoint at marker2"
42
43gdb_continue_to_breakpoint "marker1" ".*$srcfile:.*"
44
45gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
46
47gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
48
49# If the variable was recorded properly on syscall, the old contents (0)
50# will be remembered. If not, new contents ([abcdefghi]) will be used, and
51# the test will fail.
52
53gdb_test "print (int)dst\[0]" ".* = 0" "check MVCLE record 1"
54gdb_test "print (int)dst\[0x100000]" ".* = 0" "check MVCLE record 2"
55gdb_test "print (int)dst\[0xffffff]" ".* = 0" "check MVCLE record 3"
56