standard_ada_testfile p
-if [get_compiler_info] {
- return -1
-}
set old_gcc [expr [test_compiler_info {gcc-[0-7]-*}]]
proc gdb_test_with_xfail { cmd re re_xfail msg } {
return -1
}
-if [get_compiler_info] {
- return -1
-}
set old_gcc [expr [test_compiler_info {gcc-[0-3]-*}] \
|| [test_compiler_info {gcc-4-[0-6]-*}]]
standard_ada_testfile foo_ra24_010
-if [get_compiler_info] {
- return -1
-}
set old_gcc [expr [test_compiler_info {gcc-[0-8]-*}]]
foreach_with_prefix scenario {all minimal} {
set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
-if [get_compiler_info] {
- return -1
-}
-
if {[test_compiler_info {gcc-[0-3]-*}]
|| [test_compiler_info {gcc-4-[0-4]-*}]} {
# Ada array bounds are missing in older GCCs.
standard_testfile
-if [get_compiler_info] {
- warning "get_compiler failed"
- return -1
-}
-
proc altivec_abi_tests { extra_flags force_abi } {
global testfile binfile srcfile srcdir subdir
global gdb_prompt
standard_testfile
set compile_flags {debug nowarnings}
-if [get_compiler_info] {
- warning "get_compiler failed"
- return -1
-}
-
if [test_compiler_info gcc*] {
set compile_flags "$compile_flags additional_flags=-maltivec additional_flags=-mabi=altivec"
} elseif [test_compiler_info xlc*] {
standard_testfile amd64-pseudo.c
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
untested "failed to compile"
return
standard_testfile amd64-pseudo.c
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
untested "failed to compile"
return
standard_testfile amd64-pseudo.c
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
untested "failed to compile"
return
standard_testfile .c
-if [get_compiler_info] {
- return -1
-}
-
set flags { debug }
# C11 for _Alignas, gnu for asm.
standard_testfile i386-pseudo.c
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
untested "failed to compile"
return
standard_testfile .c
-if [get_compiler_info] {
- return -1
-}
-
set flags { debug }
# C11 for _Alignas, gnu for asm.
standard_testfile i386-pseudo.c
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug]] != "" } {
untested "failed to compile"
return
standard_testfile
-if [get_compiler_info] {
- warning "get_compiler failed"
- return -1
-}
-
if ![test_compiler_info gcc*] {
# We use GCC's extended asm syntax
warning "unknown compiler"
standard_testfile
-if [get_compiler_info] {
- warning "get_compiler failed"
- return -1
-}
-
if ![test_compiler_info gcc*] {
# We use GCC's extended asm syntax
warning "unknown compiler"
gdb_exit
-if { [get_compiler_info] } {
- return -1
-}
-
proc compile_and_dump {variant ccopts binfile} {
global srcdir subdir srcfile
set compile_flags {debug}
standard_testfile
set compile_flags {debug nowarnings quiet}
-if [get_compiler_info] {
- warning "get_compiler failed"
- return -1
-}
-
if [test_compiler_info gcc*] {
set compile_flags "$compile_flags additional_flags=-maltivec additional_flags=-mabi=altivec"
} elseif [test_compiler_info xlc*] {
standard_testfile
set compile_flags {debug nowarnings quiet}
-if [get_compiler_info] {
- warning "get_compiler failed"
- return -1
-}
-
if [test_compiler_info gcc*] {
set compile_flags "$compile_flags additional_flags=-maltivec additional_flags=-mabi=altivec"
} elseif [test_compiler_info xlc*] {
# compiler.
# Only test C++ if we are able.
-if { [skip_cplus_tests] || [get_compiler_info "c++"] } {
+if { [skip_cplus_tests] } {
return -1
}
set lang c++
standard_testfile all-types.c
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
set binfile [standard_output_file ${testfile}-watch_thread_num]
set gdb_prompt $old_gdb_prompt
- if { ![get_compiler_info] && [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] == "" } {
+ if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] == "" } {
gdb_exit
gdb_start
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
# This is a test of the error cases for gdb's ability to attach to a
# running process.
set srcfile "${test}-main.c"
set srcfile_lib "${test}-lib.c"
-if [get_compiler_info] {
- return -1
-}
-
# Use -soname so that the new library gets copied by build_executable_own_libs.
if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} {
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[build_executable_from_specs $testfile.exp $testfile \
{c++ additional_flags=-Wl,--gc-sections} \
$srcfile {debug c++ additional_flags=-ffunction-sections}]} {
# Create and source the file that provides information about the compiler
# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
set skip_float_test [gdb_skip_float_test]
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
-
-
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info] {
- return -1
-}
-
# Some targets can't do function calls, so don't even bother with this
# test.
if [target_info exists gdb,cannot_call_functions] {
standard_testfile .c
-# Create and source the file that provides information about the
-# compiler used to compile the test case.
-
-if [get_compiler_info] {
- return -1
-}
set skip_float_test [gdb_skip_float_test]
# Compile a variant of scalars.c using TYPE to specify the type of the
return -1
}
-if {[get_compiler_info]} {
- warning "Could not get compiler info"
- untested "no compiler info"
- return -1
-}
-
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
untested "failed to compile"
standard_testfile break.c break1.c
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug nowarnings}]} {
return -1
standard_testfile
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile2]
standard_testfile
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
return -1
}
standard_testfile .c
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } {
untested "failed to compile"
return -1
standard_testfile coremaker.c
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
untested "failed to compile"
return -1
set lib_opts debug
set exec_opts [list debug shlib=$lib_sl]
-if { [get_compiler_info] } {
- return -1
-}
-
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
untested "failed to compile shared library"
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
clean_restart ${binfile}
standard_testfile
-# What compiler are we using?
-if [get_compiler_info] {
- return -1
-}
-
# We intentionally compile the source file in twice.
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug $srcfile {debug additional_flags=-DFIRST} \
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
clean_restart ${binfile}
#
return -1
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-
-if [get_compiler_info] {
- return -1
-}
-
set dir2 [standard_output_file dir2.fileio.test]
if {[file exists $dir2] && ![file writable $dir2]} {
system "chmod +w $dir2"
set lib_opts [list debug nowarnings]
set exec_opts [list debug nowarnings shlib=$lib_sl]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile \
executable $exec_opts] != ""} {
# Unnamed union is a GNU extension, thus we restrict the test
# to gcc compiler.
-
-if [get_compiler_info] {
- return -1
-}
-
if { ![test_compiler_info gcc*] } {
return 0
}
set final_file "${testfile}-final"
set final_src ${final_file}.c
-if [get_compiler_info] {
- return -1
-}
-
# Return the binary suffix appended to program and library names to
# make each testcase variant unique.
proc make_binsuffix {resolver_attr resolver_debug final_debug} {
set lib_opts "debug"
set exec_opts [list debug shlib=${lib_so}]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib_src} ${lib_so} $lib_opts] != ""
|| [gdb_compile ${srcdir}/${subdir}/${main_src} ${binfile} executable $exec_opts] != ""} {
untested "failed to compile"
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Only test C++ if we are able.
-if { [skip_cplus_tests] || [get_compiler_info "c++"] } {
+if { [skip_cplus_tests] } {
return -1
}
set lang c++
set executable ${testfile}
set bin_flags [list debug shlib=${binfile_lib}]
-if [get_compiler_info] {
- return -1
-}
-
foreach_with_prefix n_flag { 0 1 } {
# SEP must be last for the possible `unsupported' error path.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Only test C++ if we are able.
-if { [skip_cplus_tests] || [get_compiler_info "c++"] } {
+if { [skip_cplus_tests] } {
return -1
}
set lang c++
standard_testfile .c
-if [get_compiler_info] {
- return -1
-}
-
# Build executable with stripped startup code and text section starting at zero
set opts {debug "additional_flags=-nostdlib -emain -Wl,-Ttext=0x00 -Wl,-N"}
return -1
}
-if {[get_compiler_info]} {
- untested "could not get compiler info"
- return 1
-}
-
load_lib jit-elf-helpers.exp
# The main code that loads and registers JIT objects.
return -1
}
-if {[get_compiler_info]} {
- untested "could not get compiler info"
- return 1
-}
-
load_lib jit-elf-helpers.exp
# Increase this to see more detail.
return -1
}
-if {[get_compiler_info]} {
- untested "could not get compiler info"
- return 1
-}
-
load_lib jit-elf-helpers.exp
# Increase this to see more detail.
return -1
}
-if {[get_compiler_info]} {
- untested "could not get compiler info"
- return 1
-}
-
-
# Increase this to see more detail.
set test_verbose 0
return -1
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
# The last line in the file.
set last_line [gdb_get_line_number "last line" "list0.c"]
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
clean_restart ${binfile}
standard_testfile .c
-# What compiler are we using?
-#
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug nowarnings]] != "" } {
untested "failed to compile"
return -1
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
clean_restart ${binfile}
if ![runto_main] then {
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Only test C++ if we are able.
-if { [skip_cplus_tests] || [get_compiler_info "c++"] } {
+if { [skip_cplus_tests] } {
return -1
}
set lang c++
standard_testfile
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
-
# This test must be compiled with -O2 if using gcc.
set options debug
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
clean_restart ${binfile}
standard_testfile .c
-if [get_compiler_info] {
- return -1
-}
-
if [test_compiler_info "xlc-*"] {
# By default, IBM'x xlc compiler doesn't add static variables into the symtab.
# Use "-qstatsym" to do so.
standard_testfile
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
return -1
}
set lib_opts debug
set exec_opts [list debug shlib=$lib_sl]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
untested "failed to compile"
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
clean_restart ${binfile}
}
# Only test C++ if we are able. Always use C.
-if { [skip_cplus_tests] || [get_compiler_info "c++"] } {
+if { [skip_cplus_tests] } {
set lang_list {c}
} else {
set lang_list {c c++}
return -1
}
-get_compiler_info
-
proc test_integer_literals_accepted {} {
global gdb_prompt
standard_testfile .c psym-external-decl-2.c
-get_compiler_info
if { [test_compiler_info "clang-*"] } {
return -1
}
standard_testfile psymtab1.c psymtab2.c
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] debug]} {
return -1
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
#
# set it up at a breakpoint so we can play with the variable values
#
return -1
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
# Test locating various things when stopped just inside main, after
# running init0(). To prevent cascading of errors, we report the
# first one and quit. If all pass, then we print the pass results.
set lib_opts "debug"
set exec_opts [list debug shlib=${lib1} shlib=${lib2}]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib ${lib1src} ${lib1} $lib_opts] != ""
|| [gdb_compile_shlib ${lib2src} ${lib2} $lib_opts] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $exec_opts] != ""} {
set lib1_sl [standard_output_file shreloc1.sl]
set lib2_sl [standard_output_file shreloc2.sl]
-if [get_compiler_info] {
- return -1
-}
-
set lib_opts "debug"
set exec_opts [list debug shlib=$lib1_sl shlib=$lib2_sl]
return -1
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
gdb_exit
gdb_start
standard_testfile
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
set lib_opts debug
set exec_opts [list debug shlib=$lib_sl]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile \
executable $exec_opts] != ""} {
remote_exec build "rm -f ${binfile}"
-if [get_compiler_info] {
- return -1
-}
-
set exec_opts [list debug shlib_load additional_flags=-DSHLIB_NAME=\"${lib_dlopen}\"]
if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
set binfile [standard_output_file ${executable}]
set bin_flags [list debug shlib=${binfile_lib}]
-if [get_compiler_info] {
- return -1
-}
-
# SEP must be last for the possible `unsupported' error path.
foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" {
set binfile [standard_output_file ${executable}]
# build the first test case
-if { [get_compiler_info]
- || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [list debug ldflags=-Wl,-soname,${binlibfilebase}]] != ""
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [list debug ldflags=-Wl,-soname,${binlibfilebase}]] != ""
|| [gdb_gnu_strip_debug $binlibfile]
|| [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != ""
|| [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "" } {
return 0
}
-if [get_compiler_info] {
- return -1
-}
-
# Library file.
set libname "solib-overlap-lib"
set srcfile_lib ${srcdir}/${subdir}/${libname}.c
return -1
}
-# This is required by gdb_compile_shlib.
-if {[get_compiler_info]} {
- warning "Could not get compiler info"
- untested "no compiler info"
- return 1
-}
-
# Build "wrong" and "right" versions of the libraries in separate directories.
set wrong_lib_subdir "solib-search-wrong"
set right_lib_subdir "solib-search-right"
set binfile [standard_output_file ${testfile}]
set bin_flags [list debug shlib=${binfile_lib}]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
}
# This test uses GCC-specific syntax.
-if [get_compiler_info] {
- return -1
-}
-
if {![test_compiler_info "gcc-*"]} {
return 0
}
return -1
}
-if [get_compiler_info] {
- return -1
-}
-
#
# set it up at a breakpoint so we can play with the variable values
#
# Regex matching any value of `char' type like: a = 65 'A'
set anychar_re {-?[0-9]{1,3} '(.|\\([0-7]{3}|[a-z]|\\|'))'}
-# Create and source the file that provides information about the
-# compiler used to compile the test case.
-
-if [get_compiler_info] {
- return -1
-}
-
set skip_float_test [gdb_skip_float_test]
# Compile a variant of structs.c using TYPES to specify the type of
standard_testfile .c
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
if { [prepare_for_testing "failed to prepare" $binfile $srcfile {debug}] } {
return -1
}
set exec_opts [list debug "additional_flags= -I$srcdir/../../include/ -D$target_size\
-DSHLIB_NAME\\=\"$lib_dlopen\""]
-if [get_compiler_info] {
- return -1
-}
-
if {[gdb_compile_shlib $libsrc $lib_so {debug}] != ""} {
untested "failed to compile shared library"
return
set lib_opts "debug"
set exec_opts [list debug shlib=$lib1]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib $lib1src $lib1 $lib_opts] != ""
|| [gdb_compile [list $srcfile $srcfile2] $binfile executable \
$exec_opts] != ""} {
set lib_syms [shlib_symbol_file ${libname}]
set lib_syms2 [shlib_symbol_file ${libname2}]
-if [get_compiler_info] {
- return -1
-}
-
set lib_opts debug
set exec_opts [list debug shlib_load additional_flags=-DSHLIB_NAME=\"${lib_dlopen}\" additional_flags=-DSHLIB_NAME2=\"${lib_dlopen2}\"]
standard_testfile .c
-if [get_compiler_info] {
- return -1
-}
-
set skip_float_test [gdb_skip_float_test]
set additional_flags {debug}
return -1
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
#
# set it up at a breakpoint so we can play with the variable values
#
standard_testfile .c
-# What compiler are we using?
-#
-if [get_compiler_info] {
- return -1
-}
-
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
return -1
}
set lib_dlopen [shlib_target_file ${libname}]
set lib_syms [shlib_symbol_file ${libname}]
-if [get_compiler_info] {
- return -1
-}
-
set lib_opts debug
set exec_opts [list debug shlib_load additional_flags=-DSHLIB_NAME=\"${lib_dlopen}\"]
standard_testfile
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
return -1
set wp_set 1
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
standard_testfile
-get_compiler_info
set options {}
if [test_compiler_info gcc*] {
lappend options additional_flags=-g3
standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
-get_compiler_info
set options {}
if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
lappend options additional_flags=-g3
standard_testfile
-get_compiler_info
set flags ""
if [test_compiler_info gcc*] {
set flags additional_flags=-Wno-attribute-alias
standard_testfile .c compile-shlib.c compile-constvar.S compile-nodebug.c
-get_compiler_info
set options {}
if [test_compiler_info gcc*] {
lappend options additional_flags=-g3
standard_testfile .cc
-if [get_compiler_info "c++"] {
- unsupported "couldn't find a valid c++ compiler"
- return -1
-}
-
set additional_flags ""
if {[test_compiler_info {gcc-[0-9]-*}]} {
# GCCs prior to 10.1 do not support -Wno-inaccessible-base.
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc casts03.cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile cpexprs.cc
-if {[get_compiler_info "c++"]} {
- return -1
-}
-
# Include required flags.
set flags "$flags debug c++"
standard_testfile .cc
-if { [get_compiler_info "c++"] } {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile cttiadd.cc cttiadd1.cc cttiadd2.cc cttiadd3.cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2 $srcfile3 $srcfile4] {debug c++}]} {
return -1
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
$srcfile {debug c++}]} {
return -1
standard_testfile .cc
-if [get_compiler_info "c++"] {
- untested "couldn't find a valid c++ compiler"
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
set sofile [standard_output_file gdb2384-base.so]
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info "c++"] {
- return -1
-}
-
if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug "c++" shlib=${sofile}]] != ""} {
untested "failed to compile"
standard_testfile .cc
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info "c++"] {
- return -1
-}
-
# Some targets can't do function calls, so don't even bother with this
# test.
if [target_info exists gdb,cannot_call_functions] {
return 0
}
-if [get_compiler_info] {
- return -1
-}
-
standard_testfile .cc infcall-dlopen-lib.cc
set libfile [standard_output_file ${testfile}.so]
set lib_dlopen [shlib_target_file ${testfile}.so]
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Only test C++ if we are able. Always use C.
-if { [skip_cplus_tests] || [get_compiler_info "c++"] } {
+if { [skip_cplus_tests] } {
return -1
}
set lang {c++}
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Only test C++ if we are able. Always use C.
-if { [skip_cplus_tests] || [get_compiler_info "c++"] } {
+if { [skip_cplus_tests] } {
return -1
}
set lang {c++}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc m-static1.cc
-if [get_compiler_info] {
- return -1
-}
-
set flags [list debug c++]
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
# Work around PR gcc/101452.
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile mb-inline1.cc mb-inline2.cc
set hdrfile "${testfile}.h"
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug c++}]} {
return -1
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc namespace1.cc
-if [get_compiler_info c++] {
- return -1
-}
-
set xfail_class_types 0
if {[test_compiler_info {gcc-[0-3]-*}]
|| [test_compiler_info {gcc-4-[0-4]-*}]} {
standard_testfile .cc
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info "c++"] {
- untested "couldn't find a valid c++ compiler"
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
set flags [list debug c++]
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
# Work around PR gcc/101452.
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile psmang1.cc psmang2.cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug c++}]} {
return -1
set sofile [standard_output_file ${testfile}.so]
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info "c++"] {
- return -1
-}
-
if { [gdb_compile_shlib $srcdir/$subdir/$srcfile2 $sofile {debug c++}] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable [list debug "c++" shlib=${sofile}]] != ""} {
untested "failed to compile"
standard_testfile rtti1.cc rtti2.cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug c++}]} {
return -1
standard_testfile .cc
-if {[get_compiler_info "c++"]} {
- return -1
-}
-
if {[prepare_for_testing $testfile.exp $testfile $srcfile \
{debug c++ additional_flags="-std=gnu++11"}]} {
return -1
standard_testfile .cc
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- unsupported "couldn't find a valid c++ compiler"
- return -1
-}
-
if {[test_compiler_info gcc*] && ![supports_statement_frontiers] } {
return -1
}
return -1
}
-# NOTE: prepare_for_testing calls get_compiler_info, which we need
-# for the test_compiler_info calls.
# gcc 4.4 and earlier don't emit enough info for some of our template tests.
set have_older_template_gcc 0
set have_pr_41736_fixed 1
standard_testfile .cc
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info "c++"] {
- return -1
-}
-
set flags [list debug c++]
if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
# Work around PR gcc/101452.
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return -1
}
return 0
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
# Same thing with struct and union.
gdb_test "ptype struct A" "type = struct A \{\[\r\n\]+\[ \t\]+struct B \\*foo;\[\r\n\]+\}.*" "ptype structure A"
gdb_test "ptype struct B" "type = struct B \{\[\r\n\]+\[ \t\]+struct B \\*next;\[\r\n\]+\}.*" "ptype structure B"
return 0
}
-# Create and source the file that provides information about the compiler
-# used to compile the test case.
-if [get_compiler_info] {
- return -1
-}
-
# Same thing with struct and union.
gdb_test "ptype struct A" "type = struct A \{\[\r\n\]+\[ \t\]+struct B \\*b;\[\r\n\]+\[ \t\]+struct A \\*next;\[\r\n\]+\}.*" "ptype structure A"
gdb_test "ptype struct B" "type = struct B \{\[\r\n\]+\[ \t\]+struct C \\*c;\[\r\n\]+\[ \t\]+int \\wombat;\[\r\n\]+\}.*" "ptype structure B"
return -1
}
-get_compiler_info
get_debug_format
if { [skip_inline_frame_tests] } {
return -1
set srclibfile ${testfile}-lib.f90
set libfile [standard_output_file ${testfile}-lib.so]
-# Required for -fPIC by gdb_compile_shlib.
-if { [get_compiler_info f90] } {
- warning "Could not get compiler info"
- return -1
-}
-
if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" $libfile {debug f90}] != "" } {
untested "failed to compile shared library"
return -1
standard_testfile
-if [get_compiler_info c++] {
- return -1
-}
-
# Build inferior to language specification.
proc build_inferior {exefile lang} {
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
untested "failed to compile"
return -1
return -1
}
-if {[get_compiler_info]} {
- warning "Could not get compiler info"
- untested "no compiler info"
- return -1
-}
-
standard_testfile mi-catch-load.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
set lib_opts debug
set exec_opts [list debug shlib=$lib_sl1 shlib_load]
-if {[get_compiler_info]} {
- return -1
-}
-
if {[gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""} {
untested "failed to compile shared library"
return -1
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
untested "failed to compile"
return -1
set lib_opts debug
set exec_opts [list debug shlib=$lib_sl1 shlib_load]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib $libsrc1 $lib_sl1 $lib_opts] != ""
|| [gdb_compile_shlib $libsrc2 $lib_sl2 $lib_opts] != ""} {
untested "failed to compile shared library"
set srcfile_main ${srcdir}/${subdir}/$srcfile
set bin_flags [list debug shlib=${binfile_lib}]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
|| [gdb_compile ${srcfile_main} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
standard_testfile .cc
-if [get_compiler_info "c++"] {
- return -1
-}
-
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
untested "failed to compile"
return -1
standard_testfile .c -2.c -3.c
-# What compiler are we using?
-#
-if [get_compiler_info] {
- return -1
-}
-
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2 $srcfile3] \
{debug optimize=-O2 nowarnings}]} {
runto_main
-get_compiler_info
get_debug_format
if { [skip_inline_frame_tests] } {
untested "skipping inline frame tests"
runto_main
-get_compiler_info
get_debug_format
if { [skip_inline_frame_tests] } {
untested "skipping inline frame tests"
runto_main
-get_compiler_info
get_debug_format
if { [skip_inline_var_tests] } {
untested inline-bt.exp
set binfile [standard_output_file ${testfile}]
set bin_flags [list debug shlib=${binfile_lib}]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
standard_testfile
set exec_opts [list debug shlib=$lib_sl]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
untested "failed to compile"
standard_testfile
set exec_opts [list debug shlib=$lib_sl]
-if [get_compiler_info] {
- return -1
-}
-
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
untested "failed to compile"
standard_testfile
-if [get_compiler_info c++] {
- return -1
-}
-
# Skip all tests if Python scripting is not enabled.
gdb_exit
gdb_start
standard_testfile
-if [get_compiler_info c++] {
- return -1
-}
-
# Build inferior to language specification.
proc build_inferior {exefile lang} {
global srcdir subdir srcfile testfile hex
set lib2src ${lib2file}.c
set library2 [standard_output_file ${lib2file}.sl]
-if [get_compiler_info] {
- return -1
-}
-
# Compile the first without debug info so that
# stepping and reverse stepping doesn't end up inside them.
if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib1src} ${library1} ""] != "" } {
set lib2src ${lib2file}.c
set library2 [standard_output_file ${lib2file}.sl]
-if [get_compiler_info] {
- return -1
-}
-
# Compile the first without debug info so that
# stepping and reverse stepping doesn't end up inside them.
if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib1src} ${library1} ""] != "" } {
set srclibfile ${testfile}-lib.c
set binlibfile [standard_output_file ${testfile}.so]
-if { [get_compiler_info]
- || [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" {debug}] != ""
+if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" {debug}] != ""
|| [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "shlib=${binlibfile}"] != "" } {
untested "failed to compile"
return -1
set srcfile [standard_output_file weird.s]
set binfile [standard_output_file weirdx.o]
-if { [ get_compiler_info ] } {
- return -1
-}
-
proc do_tests {} {
global binfile
global gdb_prompt
set binfile [standard_output_file $executable]
set escapedbinfile [string_to_regexp ${binfile}]
- if [get_compiler_info] {
- return -1
- }
-
gdb_test "handle SIGALRM stop print pass" "Yes.*Yes.*Yes.*"
set test_spawn_id [spawn_wait_for_attach $binfile]
global subdir
global gdb_prompt
- if [get_compiler_info] {
- return -1
- }
-
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
standard_testfile
-if [get_compiler_info] {
- return -1
-}
-
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug additional_flags=-std=gnu99}] != "" } {
return -1
set lib_opts debug
-if [get_compiler_info] {
- return -1
-}
-
# Some targets have leading underscores on assembly symbols.
set additional_flags [list debug shlib=$lib_sl1 shlib_load [gdb_target_symbol_prefix_flags]]
set lib_opts debug
-if [get_compiler_info] {
- return -1
-}
-
set additional_flags [list quiet debug shlib=$libipa shlib_load \
"additional_flags=-lust -lurcu-bp" ]