Automatic date update in version.in
[binutils-gdb.git] / gdb / testsuite / gdb.reverse / fstatat-reverse.exp
blob396d40ed08470734860ecdf7ed87f7058e3f217e
1 # Copyright 2015-2024 Free Software Foundation, Inc.
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.
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.
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/>.
16 # This file is part of the gdb testsuite.
19 # This test tests fstatat syscall for reverse execution.
22 require supports_reverse
24 standard_testfile
26 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
27     return -1
30 runto_main
32 if [supports_process_record] {
33     # Activate process record/replay
34     gdb_test_no_output "record" "turn on process record"
37 gdb_test "break marker2" \
38     "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
39     "set breakpoint at marker2"
41 gdb_continue_to_breakpoint "marker2" ".*$srcfile:.*"
43 gdb_test "break marker1" \
44     "Breakpoint $decimal at $hex: file .*$srcfile, line $decimal.*" \
45     "set breakpoint at marker1"
47 gdb_test "reverse-continue" ".*$srcfile:$decimal.*" "reverse to marker1"
49 # If the variable was recorded properly on syscall, the old contents (0)
50 # will be remembered.  If not, new contents (mode of /) will be used,
51 # and the test will fail.
53 gdb_test "print buf.st_mode" ".* = 0" "check fstatat record"