]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/jit-reader-exec.exp
Update copyright year range in all GDB files
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / jit-reader-exec.exp
CommitLineData
3666a048 1# Copyright 2018-2021 Free Software Foundation, Inc.
2cd8cc0b
TT
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# 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.
19
20if { ![istarget "*-linux*"] } then {
21 return
22}
23
922a7c7c 24standard_testfile jit-reader-exec.c
2cd8cc0b 25
922a7c7c 26set testfile2 "jit-reader-execd"
2cd8cc0b
TT
27set srcfile2 ${testfile2}.c
28set binfile2 [standard_output_file ${testfile2}]
29
30set compile_options [list debug additional_flags=-DPROGRAM=\"$binfile2\"]
31
32if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
33 executable $compile_options] != ""} {
34 untested "failed to compile"
35 return -1
36}
37
38if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
39 executable $compile_options] != ""} {
40 untested "failed to compile"
41 return -1
42}
43
44clean_restart $binfile
45
46if {![runto_main]} {
47 fail "can't run to main"
48 return
49}
50
51delete_breakpoints
52gdb_test "continue" "Inferior .* exited normally.*"