Revert "[gdb/testsuite] Clean standard_output_file dir in gdb_init"
[binutils-gdb.git] / gdb / testsuite / gdb.fortran / info-main.exp
bloba182dac9e41c82d90888dff9d25306752982dca6
1 # Copyright 2023 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 require allow_fortran_tests
18 load_lib fortran.exp
20 standard_testfile .f90
22 set old_gdbflags $GDBFLAGS
23 set GDBFLAGS [string map {"-readnow" ""} "$GDBFLAGS"]
25 if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug f90}]} {
26 return -1
29 gdb_test "info main" "simple" "info main prior to start"
31 if ![fortran_runto_main] {
32 untested "could not run to main"
33 return -1
36 gdb_test "info main" "simple" "info main post start"
38 set GDBFLAGS "$GDBFLAGS -readnow"
39 clean_restart $testfile
40 gdb_test "info main" "simple" "info main with readnow"
42 set GDBFLAGS $old_gdbflags