standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
if {![runto_main]} {
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
untested "failed to compile"
- return -1
+ return
}
# This proc restarts GDB, makes the inferior reach the desired spot - marked
standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile py-arch.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
# Build the main test executable and start GDB.
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto_main]} {
# Compile library.
if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} \
{debug c++}] != "" } {
- return -1
+ return
}
# Compile main program.
${binfile} \
executable \
[list debug c++ shlib=$binfile_lib]] != "" } {
- return -1
+ return
}
clean_restart
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set remote_python_file [gdb_remote_download host \
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {c++ debug}] != "" } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
}
if {![runto_main]} {
- return -1
+ return
}
# Build a regexp string that represents the __repr__ of a
gdb_continue_to_breakpoint "" ".*25.*"
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "add"
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
clean_restart "${testfile}"
set options {debug c++}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} ${options}] } {
- return -1
+ return
}
set past_throw_catch_line [gdb_get_line_number "Past throw-catch."]
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set bp_line [gdb_get_line_number "break-here"]
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile .c .py
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if { ![runto_main] } {
standard_testfile py-connection.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug shlib_load}] != ""} {
untested "failed to compile"
- return -1
+ return
}
set testfile2 py-events-shlib
if {[gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" \
${binfile2} {debug}] != ""} {
untested "failed to compile shared library"
- return -1
+ return
}
set binfile2_dlopen [gdb_download_shlib $binfile2]
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
untested "failed to compile"
- return -1
+ return
}
# Start with a fresh gdb.
if {[gdb_protocol_is_remote]} {
# RuntimeError: Could not find event thread
kfail "python/12966" "Signal Thread 3"
- return -1
+ return
}
load_lib gdb-python.exp
standard_testfile py-evthreads.c
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart $testfile
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
if {[build_executable "failed to prepare first executable" \
$binfile1 $srcfile]} {
- return -1
+ return
}
if {[build_executable "failed to prepare second executable" \
$binfile2 $srcfile]} {
- return -1
+ return
}
set binfile1 [gdb_remote_download host $binfile1]
standard_testfile py-explore.cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
set int_ptr_ref_desc "The value of 'int_ptr_ref' is of type 'int_ptr' which is a typedef of type 'int \\*'.*\'int_ptr_ref' is a pointer to a value of type 'int'.*"
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set SS "struct SimpleStruct"
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
if {![runto_main]} {
if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
|| [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
untested "failed to compile"
- return -1
+ return
}
# Start with a fresh gdb.
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
if {![runto_main]} {
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set remote_python_file [gdb_remote_download host \
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# The following tests require execution.
# Compile again without debug info.
gdb_exit
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
# We cannot use prepare_for_testing as we have to set the safe-patch
# to check objfile and progspace printers.
if {[build_executable $testfile.exp $testfile $srcfile {}] == -1} {
- return -1
+ return
}
# Start with a fresh gdb.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {[mi_clean_restart $::testfile]} {
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
- return -1
+ return
}
mi_runto_main
# We cannot use prepare_for_testing as we have to set the safe-patch
# to check objfile and progspace printers.
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
- return -1
+ return
}
# Start with a fresh gdb.
# We cannot use prepare_for_testing as we have to set the safe-patch
# to check objfile and progspace printers.
if {[build_executable $testfile.exp $testfile $srcfile {nodebug}] == -1} {
- return -1
+ return
}
# Start with a fresh gdb.
standard_testfile
if { [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
- return -1
+ return
}
# Start with a fresh gdb.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
gdb_test_multiline "install new_thread event handler" \
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
if {![runto_main ]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "break here"]
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $opts] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_py_test_silent_cmd "python lt = gdb.selected_frame().find_sal().symtab.linetable()" \
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
- return -1
+ return
}
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
set remote_python_file [gdb_remote_download host ${srcdir}/${subdir}/${pyfile}]
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
- return -1
+ return
}
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Make the -gdb.py script available to gdb, it is automagically loaded by gdb.
standard_testfile
if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" } {
- return -1
+ return
}
mi_clean_restart $::testfile
set pyfile py-prettyprint.py
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DMI}] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {[mi_clean_restart $::testfile]} {
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
- return -1
+ return
}
mi_runto_main
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}-cxx" \
executable {debug c++ additional_flags=-DMI}] != "" } {
untested "failed to compile in C++ mode"
- return -1
+ return
}
if {[mi_clean_restart ${::testfile}-cxx]} {
if {[lsearch -exact [mi_get_features] python] < 0} {
unsupported "python support is disabled"
- return -1
+ return
}
with_test_prefix "varobj fake" {
if {[build_executable "failed to prepare" ${testfile} ${srcfile} \
{debug build-id}]} {
- return -1
+ return
}
# Remove debug information from BINFILE and place it into
# BINFILE.debug.
if {[gdb_gnu_strip_debug $binfile]} {
unsupported "cannot produce separate debug info files"
- return -1
+ return
}
set remote_python_file \
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here"]
require allow_python_tests
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
- return -1
+ return
}
# Start with a fresh gdb.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
# Now build another copy of the testcase, this time without debug info.
if { [prepare_for_testing "failed to prepare" ${testfile}2 ${srcfile} {nodebug ldflags=-Wl,--strip-debug}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto break_function]} {
- return -1
+ return
}
set remote_python_file [gdb_remote_download host \
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto tick_tock]} {
- return -1
+ return
}
set remote_python_file [gdb_remote_download host \
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "b [gdb_get_line_number {break to inspect} ${testfile}.c ]" \
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto tick_tock]} {
- return -1
+ return
}
set remote_python_file [gdb_remote_download host \
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
set remote_python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
if {![runto_main ]} {
- return -1
+ return
}
proc prepare_test { } {
$testfile {c++} \
$srcfile {c++ debug} \
$srcfile2 {c++}] == -1 } {
- return -1
+ return
}
# Start with a fresh gdb.
standard_testfile
if {[prepare_for_testing "preparing" $testfile $srcfile] == -1} {
- return -1
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/py-progspace-events.py]
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
- return -1
+ return
}
clean_restart
require allow_python_tests
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
- return -1
+ return
}
save_vars { INTERNAL_GDBFLAGS GDBFLAGS } {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
if { [gdb_compile_pthreads "$srcdir/$subdir/$srcfile" "$binfile" executable {debug} ] != "" } {
untested "failed to prepare"
- return -1
+ return
}
clean_restart $testfile
if { ![runto_main] } {
- return -1
+ return
}
# set up breakpoints
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 }
if {![runto_main]} {
- return -1
+ return
}
with_test_prefix "no or double record" {
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 }
if {![runto_main]} {
- return -1
+ return
}
with_test_prefix "no or double record" {
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
if {[prepare_for_testing $testfile.exp $testfile $srcfile \
{debug c++ additional_flags="-std=c++11"}]} {
- return -1
+ return
}
if {![runto_main]} {
require allow_gdbserver_tests allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Make sure we're disconnected, in case we're testing with an
if { [gdb_compile_shlib ${srcdir}/${subdir}/${libsrc} ${library} "debug"] != "" } {
untested "failed to compile shared library"
- return -1
+ return
}
set exec_opts [list debug shlib=${library}]
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $exec_opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Start with a fresh gdb.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_py_test_silent_cmd "python v = gdb.lookup_symbol('the_variable')" \
set opts { debug additional_flags=-DUSE_TWO_FILES }
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2 $srcfile3] $opts]} {
- return -1
+ return
}
set readnow_p [readnow]
set binfile [standard_output_file $testfile]
if { [prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] $opts] } {
- return -1
+ return
}
gdb_test "python print (gdb.lookup_global_symbol ('(anonymous namespace)::anon') is None)" \
standard_testfile py-symbol.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
load_lib gdb-python.exp
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{debug c++}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
gdb_test "test-events" "Event testers registered."
if {![runto_main]} {
- return -1
+ return
}
standard_testfile
if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${::testfile}
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
set remote_python_file [gdb_remote_download host \
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
debug] } {
- return -1
+ return
}
# The following tests require execution.
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
if {![runto_main]} {
- return -1
+ return
}
gdb_test "source ${pyfile}" "Python script imported" \
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
set flags "additional_flags=-fno-stack-protector"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug $flags"] } {
- return -1
+ return
}
# This test runs on a specific platform.
standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
if {![runto_main]} {
# Build C version of executable. C++ is built later.
if { [build_inferior "${binfile}" "c"] < 0 } {
- return -1
+ return
}
# Start with a fresh gdb.
standard_testfile
if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != ""} {
- return -1
+ return
}
mi_clean_restart $::testfile
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
require allow_python_tests
standard_testfile py-xmethods.cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
- return -1
+ return
}
if {![runto_main]} {
if {[build_executable $testfile.exp $testfile \
[list $srcfile $srcfile2] debug] == -1} {
- return -1
+ return
}
clean_restart
lappend_include_file flags $srcdir/lib/attributes.h
if {[build_executable "failed to prepare" ${testfile} ${srcfile} $flags] == -1} {
- return -1
+ return
}
clean_restart
standard_testfile py-arch.c
if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} {
- return -1
+ return
}
clean_restart