Update copyright year range in header of all files managed by GDB
[binutils-gdb.git] / gdb / testsuite / gdb.base / jit-reader-exec.exp
blobd1009449fd0afc380a48f85aede5cf59a7de57b8
1 # Copyright 2018-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 # Regression test for a jit.c bug.  Previously it would crash if an
17 # inferior that used the JIT API then exec'd a program that did not
18 # use it.
20 if {![istarget "*-linux*"]} {
21     return
24 standard_testfile jit-reader-exec.c
26 set testfile2 "jit-reader-execd"
27 set srcfile2 ${testfile2}.c
28 set binfile2 [standard_output_file ${testfile2}]
30 if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
31          executable {debug}] != ""} {
32     untested "failed to compile"
33     return -1
36 if { [is_remote target] } {
37     set binfile2 [gdb_remote_download target $binfile2]
40 set compile_options [list debug additional_flags=-DPROGRAM=\"$binfile2\"]
42 if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
43          executable $compile_options] != ""} {
44     untested "failed to compile"
45     return -1
48 clean_restart $binfile
50 if {![runto_main]} {
51     return
54 delete_breakpoints
55 gdb_test "continue" "Inferior .* exited normally.*"