@@ -29,11 +29,11 @@ standard_testfile run.c
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/unbuffer_output.c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile $flags] } {
- return -1
+ return
}
# Run with no arguments.
gdb_run_cmd
@@ -16,11 +16,11 @@
# Test that we can access memory while the inferior is running.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
# The test proper. NON_STOP indicates whether we're testing in
# non-stop, or all-stop mode.
@@ -34,11 +34,11 @@ require can_spawn_for_attach
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
untested "failed to compile"
- return -1
+ return
}
# Use 'spawn_wait_for_attach' to start the test program running. It'll
# also sleep for a short time in order to make sure that it's running
# so that GDB may attach to it.
@@ -20,11 +20,11 @@ standard_testfile .cc
require allow_cplus_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
{debug c++}] } {
- return -1
+ return
}
set lineno [gdb_get_line_number "multiple locations here"]
# advance/until to an inlined line number, which has been inlined
@@ -16,11 +16,11 @@
# advance.exp -- Expect script to test 'advance' in gdb
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -28,11 +28,11 @@
#
standard_testfile all-types.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -17,11 +17,11 @@
# into effect when we run a foreground command.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} {
- return -1
+ return
}
# Because runto_main doesn't know how to handle the prompt with annotations,
# run to main before we set the annotation level.
if {![runto_main]} {
@@ -33,11 +33,11 @@ set breakpoints_invalid "\r\n\032\032breakpoints-invalid\r\n"
#
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
#
# break in main
#
@@ -27,11 +27,11 @@ require target_can_use_run_cmd
#
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
#
# break in main
@@ -24,23 +24,23 @@ set srcfilelink [build_standard_output_file realname-expand-link.c]
remote_exec build "ln -sf ${srcdirabs}/${subdir}/${srcfile2} $srcfilelink"
if { [file type $srcfilelink] != "link" } {
unsupported "target directory cannot have symbolic links"
- return -1
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint func message
gdb_test_no_output "set annotate 1"
@@ -15,11 +15,11 @@
#
standard_testfile .c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -25,11 +25,11 @@ require {expr {[have_startup_shell] != -1}}
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile] == -1} {
untested "failed to compile"
- return -1
+ return
}
# Assuming a running GDB. Check the status of the single inferior
# argument feature. When this feature is on GDB passes inferior
# arguments as a single combined string. When this feature is off GDB
@@ -27,11 +27,11 @@ require {!is_remote host}
standard_testfile
set has_argv0 [gdb_has_argv0]
if { [build_executable ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
- return -1
+ return
}
with_test_prefix "file symlink" {
set test "kept name"
@@ -27,11 +27,11 @@
#
standard_testfile int-type.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with the variable values
@@ -17,11 +17,11 @@
standard_testfile ${srcdir}/gdb.base/array-repeat.c
if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
[list debug ${lang}]]} {
- return -1
+ return
}
gdb_test_no_output "set print array-indexes on"
if {![runto_main]} {
@@ -17,11 +17,11 @@
standard_testfile ${srcdir}/gdb.base/array-repeat.c
if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} \
[list debug ${lang}]]} {
- return -1
+ return
}
if {![runto_main]} {
perror "Could not run to main."
continue
@@ -32,11 +32,11 @@
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -19,11 +19,11 @@
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with it
#
@@ -21,11 +21,11 @@ require can_spawn_for_attach
require {istarget *-linux*}
standard_testfile
if { [build_executable "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
@@ -18,11 +18,11 @@
require can_spawn_for_attach
standard_testfile
if {[build_executable "failed to build" $testfile $srcfile {debug}]} {
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
@@ -21,11 +21,11 @@
require can_spawn_for_attach
standard_testfile
if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] == -1 } {
- return -1
+ return
}
proc do_test {} {
global binfile
global decimal
@@ -24,11 +24,11 @@ standard_testfile .c
set genfile [standard_output_file ${testfile}-gen.h]
set executable $testfile
if {[build_executable_own_libs ${testfile}.exp $executable $srcfile \
{pie}] == ""} {
- return -1
+ return
}
# Program Headers:
# Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
# LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x134f5ec 0x134f5ec R E 0x200000
@@ -108,11 +108,11 @@ file delete -- $genfile
set phdr [read_phdr $binfile "readelf rebuilt with stub_size"]
set dynamic_vaddr_prelinkno [lindex $phdr 0]
if {![prelink_yes $prelink_args]} {
- return -1
+ return
}
set phdr [read_phdr $binfile "readelf with prelink -R"]
set dynamic_vaddr_prelinkyes [lindex $phdr 0]
@@ -17,11 +17,11 @@ require can_spawn_for_attach
standard_testfile .c
set executable ${testfile}
if { [prepare_for_testing "failed to prepare" $executable "" [list debug pie]] } {
- return -1
+ return
}
set arch ""
set test "show architecture"
gdb_test_multiple $test $test {
@@ -17,11 +17,11 @@ require can_spawn_for_attach
standard_testfile
set executable ${testfile}
if { [prepare_for_testing "failed to prepare" $executable] } {
- return -1
+ return
}
# Start the program running and then wait for a bit, to be sure
# that it can be attached to.
@@ -32,11 +32,11 @@
require !use_gdb_stub
standard_testfile
if {[build_executable "failed to build" $testfile $srcfile debug]} {
- return -1
+ return
}
# Start the program running, and return its PID, ready for attaching.
proc start_program {testfile} {
@@ -28,25 +28,25 @@ remote_exec build "rm -f ${binfile} ${binfile2} ${binfile3}"
# build the first test case
#
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Build the in-system-call test
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable {debug}] != "" } {
untested "failed to compile in-system-call test"
- return -1
+ return
}
# Build the third file, used to check attach when the exec-file has changed.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile3}" "${binfile3}" executable {debug}] != "" } {
untested "failed to compile attach exec-file changed test"
- return -1
+ return
}
# This is a test of the error cases for gdb's ability to attach to a
# running process.
@@ -17,11 +17,11 @@
# native targets.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
require have_native_target
# Returns the topmost target pushed on the target stack. TEST is used
@@ -23,11 +23,11 @@ set targetscriptdir "${targetdir}/[file dirname ${binfile}]"
set targetscript "${targetscriptdir}/${testfile}-gdb.gdb"
remote_exec host "rm -rf ${targetdir}"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
remote_exec host "mkdir -p ${targetscriptdir}"
remote_exec host "cp ${sourcescript} ${targetscript}"
@@ -28,11 +28,11 @@ set gcorefile ${binfile}.gcore
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{debug additional_flags=-DUSE_RLIMIT}] != ""
&& [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Use a fresh directory to confine the native core dumps.
# Make it the working directory for the inferior.
set coredir [standard_output_file coredir.[getpid]]
@@ -16,11 +16,11 @@
# A place for miscellaneous tests related to backtrace.
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -18,11 +18,11 @@
standard_testfile args.c
if {[prepare_for_testing "failed to prepare" ${testfile}! $srcfile \
{debug nowarnings}]} {
- return -1
+ return
}
# Verify that we can run the program and that it terminates normally.
runto_main
@@ -17,11 +17,11 @@
# wrong state.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
- return -1
+ return
}
set file_arg $binfile
if {[is_remote host]} {
set file_arg [remote_download host $file_arg]
@@ -55,11 +55,11 @@ set binfile_lib [standard_output_file ${lib_basename}.so]
set lib_flags debug
# Compile shared library:
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Open the shared library and determine some basic facts. The key
# things that we need to learn are 1) whether the solib is 32-bit or
# 64-bit ELF file, and 2) the endianness.
@@ -69,11 +69,11 @@ fconfigure $solib_fp -translation binary
# Read and check EI_MAG to verify that it's really an ELF file.
set data [read $solib_fp 4]
if { ![string equal $data "\x7fELF"] } {
close $solib_fp
untested "shared library is not an ELF file"
- return -1
+ return
}
# Read EI_CLASS for ELF32 versus ELF64.
set data [read $solib_fp 1]
set is_elf64 [string equal $data "\x02"]
@@ -91,11 +91,11 @@ if { [catch {exec $objcopy_program \
--dump-section .dynsym=${binfile_lib}.dynsym \
--dump-section .dynstr=${binfile_lib}.dynstr \
${binfile_lib}} output] } {
untested "failed objcopy dump-section"
verbose -log "objcopy output: $output"
- return -1
+ return
}
# Determine length of .dynstr. We'll use the length for creating invalid
# offsets into .dynstr.
set dynstr_len [file size ${binfile_lib}.dynstr]
@@ -142,11 +142,11 @@ close $dynsym_fp
if { [catch {exec $objcopy_program \
--update-section .dynsym=${binfile_lib}.dynsym \
${binfile_lib}} output] } {
untested "failed objcopy update-section"
verbose -log "objcopy output: $output"
- return -1
+ return
}
clean_restart
# Count number of distinct BFD error messages via 'bfd_error_count'
@@ -21,11 +21,11 @@
require {!is_remote host}
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Run the test. Sets a breakpoint with a condition that sends a
# SIGINT to GDB, and ensures that that doesn't make the breakpoint hit
# cause a premature stop. This emulates pressing Ctrl-C just while
@@ -18,11 +18,11 @@
# PR gdb/17471.
standard_testfile
if { [build_executable "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
set linenum [gdb_get_line_number "set break here"]
# Run the test proper. CONTINUE_CMD is the background continue
@@ -17,11 +17,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
#
# Test bitfield locating and uniqueness.
# For each member, set that member to 1 and verify that the member (and only
@@ -25,11 +25,11 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
set has_signed_bitfields 1
#
@@ -25,11 +25,11 @@ require {!target_info exists gdb,nosignals}
require {!target_info exists gdb,nointerrupts}
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# See intro.
proc do_test {} {
@@ -18,11 +18,11 @@
# that has "continue" in its command list, and then does "run".
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
set x_file ${srcdir}/${subdir}/$testfile.gdb
# Run the test proper.
@@ -20,11 +20,11 @@
# '-ex' option.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
set script_file $srcdir/$subdir/$testfile.gdb
save_vars { GDBFLAGS } {
@@ -17,11 +17,11 @@
# expected when the commands are defined for multiple breakpoints.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
set script_file ${srcdir}/${subdir}/$testfile.gdb
gdb_test "source $script_file" \
@@ -34,11 +34,11 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
# Run to main so that we connect to the target if using 'target
# remote'. This means that the is_address_zero_readable, and the
# 'show breakpoint condition-evaluation' checks below will be
# performed with the remote connection in place.
if { ![runto_main] } {
- return -1
+ return
}
# This test relies on reading address zero triggering a SIGSEGV.
if { [is_address_zero_readable] } {
return
@@ -23,11 +23,11 @@ set options { debug }
if { ![target_info exists gdb,nosignals] } {
lappend options "additional_flags=-DSIGNALS"
}
if {[build_executable "failed to prepare" $testfile $srcfile $options]} {
- return -1
+ return
}
set line_bp [gdb_get_line_number "write permanent bp"]
# The test proper. ALWAYS_INSERTED indicates whether testing in
@@ -18,11 +18,11 @@
require {!target_info exists gdb,nosignals}
standard_testfile
if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] == -1 } {
- return -1
+ return
}
with_test_prefix "single-step" {
global testfile
@@ -16,11 +16,11 @@
# Test that 'set breakpoint always-inserted 1' is not a brick
# Also verifies that breakpoint enabling/disabling works properly
# with duplicated breakpoints.
if { [prepare_for_testing "failed to prepare" break-always break-always.c] } {
- return -1
+ return
}
set bar_location [gdb_get_line_number "break in bar" break-always.c]
gdb_test_no_output "set breakpoint always-inserted on"
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto callee]} {
return 0
}
@@ -28,11 +28,11 @@
standard_testfile start.c
require !use_gdb_stub
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {additional_flags=-static}] } {
- return -1
+ return
}
set test "info files"
set entry ""
gdb_test_multiple $test $test {
@@ -16,11 +16,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing ${testfile}.exp $testfile] } {
- return -1
+ return
}
set bp_line [gdb_get_line_number "break here" ${testfile}.c]
set bp_line_actual [gdb_get_line_number "ANCHOR" ${testfile}.inc]
@@ -13,11 +13,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if { [prepare_for_testing "failed to prepare" "break-inline" {} {debug nowarnings optimize=-O2}] } {
- return -1
+ return
}
gdb_breakpoint "main" "temporary"
gdb_run_cmd
gdb_test "" "Temporary breakpoint.*foo\\(\\).*"
@@ -29,15 +29,15 @@ set binfile_lib ${binprefix}.so
set srcfile "${test}-main.c"
set srcfile_lib "${test}-lib.c"
if {[build_executable "build library" ${binfile_lib} ${srcfile_lib} \
{debug shlib}] == -1} {
- return -1
+ return
}
if {[build_executable ${test}.exp $binfile_test ${srcfile_test} {}] == -1} {
- return -1
+ return
}
# Note: The separate debug info file content build-id/crc32 are not verified
# contrary to the GDB search algorithm skipping non-matching ones.
proc system_debug_get {exec} {
@@ -19,11 +19,11 @@
# PROGRAM".
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Run the test proper. INITIAL_LOAD determines whether the program is
# initially loaded by the "file" command or by passing it to GDB on
# the command line.
@@ -29,11 +29,11 @@ standard_testfile .cc
if {[build_executable_from_specs $testfile.exp $testfile \
{c++ ldflags=-Wl,--gc-sections} \
$srcfile {debug c++ additional_flags=-ffunction-sections}]} {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
proc set_breakpoint_on_gcd_function {} {
@@ -21,18 +21,18 @@ set libname $testfile-solib
set srcfile_lib $srcdir/$subdir/$libname.c
set binfile_lib [standard_output_file $libname.so]
if { [gdb_compile_shlib $srcfile_lib $binfile_lib {}] != "" } {
untested "failed to compile shared library"
- return -1
+ return
}
set binfile_lib_target [gdb_download_shlib $binfile_lib]
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
[list debug shlib_load additional_flags=-DSHLIB_NAME=\"$binfile_lib_target\"]] } {
- return -1
+ return
}
gdb_locate_shlib $binfile_lib
# Enable stop-on-solib-events
@@ -55,11 +55,11 @@ gdb_test_multiple "p /x \$pc" "" {
-re -wrap "" {
}
}
if { $pc == "" } {
unsupported "Couldn't get $pc"
- return -1
+ return
}
regsub "0x0*" $pc "" pc
# Verify that pc is at info_start probe address.
gdb_test_multiple "info probes stap rtld" "" {
@@ -70,11 +70,11 @@ gdb_test_multiple "info probes stap rtld" "" {
}
}
if { ! $using_probes } {
unsupported "probes not present on this system"
- return -1
+ return
}
set sysroot ""
set test "show sysroot"
gdb_test_multiple $test $test {
@@ -17,11 +17,11 @@
# target.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Run the test proper. INITIAL_LOAD determines whether the program is
# initially loaded by the "file" command or by passing it to GDB on
# the command line. ALWAYS_INSERT determines whether always-inserted
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This file was written by Rob Savoye. (rob@cygnus.com)
if { [build_executable "failed to prepare" "break" {break.c break1.c} {debug nowarnings}] } {
- return -1
+ return
}
set srcfile break.c
set srcfile1 break1.c
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
@@ -803,11 +803,11 @@ test_next_with_recursion
# build a new file with optimization enabled so that we can try breakpoints
# on targets with optimized prologues
if { [build_executable "failed to prepare" "breako2" {break.c break1.c} {debug nowarnings optimize=-O2}] } {
- return -1
+ return
}
proc_with_prefix test_break_optimized_prologue {} {
clean_restart breako2
@@ -20,15 +20,15 @@
require !gdb_debug_enabled
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Delete all target-supplied memory regions.
delete_memory_regions
@@ -139,11 +139,11 @@ proc get_next_insn {} {
set hw_step [probe_target_hardware_step]
if {![get_function_bounds "main" main_lo main_hi]} {
# Can't do the following tests if main's bounds are unknown.
- return -1
+ return
}
# Manually create a read-only memory region that covers 'main'.
gdb_test_no_output "mem $main_lo $main_hi ro" \
"create read-only mem region covering main"
@@ -14,16 +14,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# We need to start the inferior to place the breakpoints in the memory at all.
if {![runto_main]} {
- return -1
+ return
}
# The default "auto" mode removes all the breakpoints when we stop (and not
# running the nonstop mode). We would not be able to test the shadow.
gdb_test_no_output "set breakpoint always-inserted on"
@@ -18,17 +18,17 @@
# switched off.
standard_testfile bt-on-fatal-signal.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
# Check we can run to main. If this works this time then we just
# assume that it will work later on (when we repeatedly restart GDB).
if {![runto_main]} {
- return -1
+ return
}
# Check that the backtrace-on-fatal-signal feature is supported. If
# this target doesn't have the backtrace function available then
# trying to turn this on will give an error, in which case we just
@@ -24,17 +24,17 @@ standard_testfile
# established the connection to the remote host?), so just skip this
# test for remote host setups.
require {!is_remote host}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
# Check we can run to main. If this works this time then we just
# assume that it will work later on (when we repeatedly restart GDB).
if {![runto_main]} {
- return -1
+ return
}
# Check that the backtrace-on-fatal-signal feature is supported. If
# this target doesn't have the backtrace function available then
# trying to turn this on will give an error, in which case we just
@@ -16,11 +16,11 @@
# Check that the selected stack frame doesn't change after a backtrace.
standard_testfile
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
- return -1
+ return
}
proc check_selected_frame_after_bt { bt_cmd stack_pattern } {
clean_restart $::testfile
@@ -29,16 +29,16 @@ require {!is_remote host}
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug build-id}] == -1} {
- return -1
+ return
}
# Split out BINFILE.debug. Remove debug from BINFILE.
if {[gdb_gnu_strip_debug $binfile] != 0} {
- return -1
+ return
}
# Get the '.build-id/xx/xxx...xxx' part of the filename.
set build_id_filename [build_id_debug_filename_get $binfile]
@@ -20,11 +20,11 @@
standard_testfile c-linkage-name.c c-linkage-name-2.c
set sources "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}"
if { [gdb_compile "${sources}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
gdb_test_no_output "set language c"
gdb_load ${binfile}
@@ -24,22 +24,22 @@
standard_testfile
# Only run on native boards.
require !use_gdb_stub
if { [target_info gdb_protocol] == "extended-remote" } {
- return -1
+ return
}
# Because we need to modify the source file later, it's better if we
# just copy it to our output directory (instead of messing with the
# user's source directory).
set newsrc [standard_output_file $testfile].c
file copy -force -- $srcdir/$subdir/$srcfile $newsrc
set srcfile $newsrc
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
# Get the line number for the line with the "break-here" marker.
set bp_line [gdb_get_line_number "break-here" $srcfile]
@@ -77,11 +77,11 @@ file rename -force -- $bkpsrc $srcfile
sleep 1
# Recompile the modified source. We use "gdb_compile" here instead of
# "prepare_for_testing" because we don't want to call "clean_restart".
if { [gdb_compile "${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
# Rerun the program. This should not only force GDB to reload the
# source cache, but also to break at BP_LINE again, which now has
# different contents.
@@ -31,11 +31,11 @@ set allow_float_test [allow_float_test]
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/unbuffer_output.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
- return -1
+ return
}
set oldtimeout $timeout
set timeout [expr {$timeout + 60}]
@@ -32,11 +32,11 @@ require {!target_info exists gdb,cannot_call_functions}
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/unbuffer_output.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
- return -1
+ return
}
gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off"
gdb_test_no_output "set print symbol off"
@@ -19,15 +19,15 @@
require {!target_info exists gdb,cannot_call_functions}
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "STOP"]
gdb_continue_to_breakpoint "STOP"
@@ -17,15 +17,15 @@
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
{nodebug}] == -1} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "p a_loc ()" \
"'a_loc' has unknown return type; cast the call to its declared return type"
@@ -26,11 +26,11 @@ require allow_fork_tests
# Reusing foll-fork.c since it's a simple forking program.
standard_testfile foll-fork.c
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile \
{additional_flags=-static}] } {
- return -1
+ return
}
gdb_test "catch fork" "Catchpoint \[0-9\]* \\(fork\\)"
gdb_run_cmd
@@ -31,15 +31,15 @@ set bp_location [gdb_get_line_number "set breakpoint here"]
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/unbuffer_output.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "handle SIGSEGV nostop noprint" \
"Signal\[ \t\]+Stop\[ \t\]+Print\[ \t\]+Pass to program\[ \t\]+Description\r\nSIGSEGV\[ \t\]+No\[ \t\]+No\[ \t\]+Yes\[ \t\].*"
gdb_test "handle SIGILL nostop noprint" \
@@ -16,20 +16,20 @@
require allow_shlib_tests
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
untested "failed to compile"
- return -1
+ return
}
set testfile2 catch-load-so
set srcfile2 ${testfile2}.c
set binfile2 [standard_output_file ${testfile2}.so]
set binfile2_dlopen [shlib_target_file ${testfile2}.so]
if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] != "" } {
untested "failed to compile shared library"
- return -1
+ return
}
# Run one set of tests.
# SCENARIO is the name of the test scenario, it is just used in test
# names.
@@ -17,15 +17,15 @@ require {!target_info exists gdb,nosignals}
require allow_fork_tests
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Test "catch signal SIGHUP"
gdb_test "catch signal SIGHUP" "Catchpoint .*"
gdb_breakpoint ${srcfile}:[gdb_get_line_number "first HUP"]
@@ -30,15 +30,15 @@ require {!target_info exists gdb,nosignals}
require supports_get_siginfo_type
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 "set breakpoint here"]
gdb_test "catch signal"
@@ -16,11 +16,11 @@
require {!target_info exists gdb,nosignals}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
proc test_catch_signal {signame} {
global srcfile
@@ -793,11 +793,11 @@ proc setup_all_syscalls {} {
}
return 1
}
if { ![setup_all_syscalls] } {
- return -1
+ return
}
# Fill all the syscalls numbers before starting anything.
fill_all_syscalls_numbers
@@ -22,11 +22,11 @@
standard_testfile .c charset-malloc.c
if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
- return -1
+ return
}
# Parse the output from a `show charset' command. Return the host
# and target charset as a two-element list.
proc parse_show_charset_output {testname} {
@@ -156,11 +156,11 @@ gdb_expect {
# If gdb was built with a phony iconv, it will only have two character
# sets: "auto" and the default. In this situation, this set of tests
# is pointless.
if {[llength [array names charsets]] < 3} {
untested "fewer than 3 charsets"
- return -1
+ return
}
send_gdb "set target-charset\n"
gdb_expect {
-re "Requires an argument. Valid arguments are (.*)\\.\r\n$gdb_prompt $" {
@@ -31,11 +31,11 @@ set flags {}
lappend flags debug
lappend flags additional_flags=-DFAKEARGV
lappend_include_file flags $srcdir/lib/unbuffer_output.c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile $flags] } {
- return -1
+ return
}
# Run to FUNCTION. If that fails, issue a FAIL and make the caller
# return.
@@ -16,11 +16,11 @@
# Test the compare-sections command.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
- return -1
+ return
}
set is_pie [exec_is_pie $binfile]
# Run the compare-sections command along with any options as specified
@@ -23,11 +23,11 @@ gdb_start
# Tests below are about tab-completion, which doesn't work if readline
# library isn't used. Check it first.
if { ![readline_is_used] } {
untested "no tab completion support without readline"
- return -1
+ return
}
# Start of tests.
# Test TAB with no input.
@@ -52,11 +52,11 @@
standard_testfile break.c break1.c
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -163,11 +163,11 @@ gdb_assert {$all_regs eq $completed_regs} "complete 'info registers '"
# Tests below are about tab-completion, which doesn't work if readline
# library isn't used. Check it first.
if { ![readline_is_used] } {
- return -1
+ return
}
# The bulk of this test script pre-dates the completion-support
# library, and should probably (where possible) be converted.
# However, for now, new tests are being added using this library.
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -15,11 +15,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {[runto f2]} {
get_debug_format
if {[test_compiler_info gcc-2-*] && [test_debug_format "DWARF \[0-9\]"]} {
@@ -24,11 +24,11 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -17,11 +17,11 @@
# false works as expected.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -23,11 +23,11 @@
standard_testfile break.c break1.c
if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \
{debug nowarnings}]} {
- return -1
+ return
}
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]
@@ -19,11 +19,11 @@
# over another breakpoint, without a user visible stop in between.
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -21,11 +21,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -35,11 +35,11 @@
# *GDB hangs forever*
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# DISPLACED indicates whether to use displaced-stepping.
proc do_test {displaced breakpoint_always_inserted} {
global gdb_prompt decimal
@@ -24,28 +24,28 @@
standard_testfile "normal.c"
# This test is Linux x86_64 only.
if { ![istarget *-*-linux*] } {
untested "$testfile.exp"
- return -1
+ return
}
require is_x86_64_m64_target gcore_cmd_available
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug build-id}] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
# First we need to generate a corefile.
set corefilename "[standard_output_file gcore.test]"
if { ![gdb_gcore_cmd "$corefilename" "save corefile"] } {
verbose -log "Could not save corefile"
untested "$testfile.exp"
- return -1
+ return
}
# Determine if GDB dumped the mapping containing the build-id. This
# is done by invoking an external program (eu-unstrip).
if { [catch {exec [gdb_find_eu-unstrip] -n --core $corefilename} output] == 0 } {
@@ -16,19 +16,19 @@
standard_testfile
# This test is Linux-only.
if {![istarget *-*-linux*]} {
untested "coredump-filter.exp"
- return -1
+ return
}
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"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
@@ -182,11 +182,11 @@ set all_anon_corefiles { { "non-Private-Anonymous" "0x7e" \
# If corefile loading is not supported, we do not even try to run the
# tests.
set core_supported [gdb_gcore_cmd "$non_private_anon_core" "save a corefile"]
if { !$core_supported } {
untested "corefile generation is not supported"
- return -1
+ return
}
gdb_test_multiple "info inferiors" "getting inferior pid" {
-re "process $decimal.*\r\n$gdb_prompt $" {
}
@@ -22,11 +22,11 @@ require {is_any_target "*-*-linux*" "*-*-freebsd*"}
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile] == -1} {
untested "failed to compile"
- return -1
+ return
}
# Linux core files can encore upto 80 characters for the command and
# arguments in the psinfo. If BINFILE is less than 80 characters in
# length then lets try to make it longer.
@@ -134,11 +134,11 @@ for { set i 0 } { $i < 10 } { incr i } {
}
}
if { $env_var_name eq "" } {
unsupported "couldn't find suitable environment variable name"
- return -1
+ return
}
# Generate a core file with this environment variable set.
set env_var_value "TEST VALUE"
save_vars { ::env($env_var_name) } {
@@ -22,11 +22,11 @@ require {is_any_target "*-*-linux*" "*-*-freebsd*"}
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile {debug build-id}] == -1} {
untested "failed to compile"
- return -1
+ return
}
# Load the COREFILE and confirm that GDB auto-loads the executable.
# The symbols should be read from SYMBOL_FILE and the core file should
# be reported as generated by GEN_FROM_FILE.
@@ -21,11 +21,11 @@ require isnative
standard_testfile coremaker.c
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
untested "failed to compile"
- return -1
+ return
}
# Do not delete coremap.data when calling core_find. This file is
# required for GDB to find mmap'd data in the "accessing read-only
# mmapped data in core file" test.
@@ -33,11 +33,11 @@ if { ![istarget *-linux*] } {
standard_testfile coremaker2.c
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
untested "failed to compile"
- return -1
+ return
}
set corefile [core_find $binfile {}]
if {$corefile == ""} {
untested "unable to create or find corefile"
@@ -86,20 +86,20 @@ gdb_test "ptype struct t_struct" \
# Test the equivalence between '.' and '->' for struct member references.
if {[gdb_test "ptype v_struct1.v_float_member" "type = float"] < 0} {
- return -1
+ return
}
if {[gdb_test "ptype v_struct1->v_float_member" "type = float"] < 0} {
- return -1
+ return
}
if {[gdb_test "ptype v_t_struct_p.v_float_member" "type = float"] < 0} {
- return -1
+ return
}
if {[gdb_test "ptype v_t_struct_p->v_float_member" "type = float"] < 0} {
- return -1
+ return
}
gdb_test "ptype struct link" \
[multi_line \
"type = struct link {" \
@@ -37,29 +37,29 @@ set libobj1_opts { debug
set libobj2_opts { debug
additional_flags=-DVERSION=203
additional_flags=-DGET_VERSION=get_version_2 }
if { [gdb_compile_shlib $libsrc $libobj1 $libobj1_opts ] != "" } {
- return -1
+ return
}
if { [gdb_compile_shlib $libsrc $libobj2 $libobj2_opts ] != "" } {
- return -1
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${executable}.c" \
[standard_output_file ${executable}] \
executable \
[list debug shlib=${libobj1} shlib=${libobj2}]]
!= ""} {
- return -1
+ return
}
clean_restart $executable
gdb_load_shlib $libobj1
gdb_load_shlib $libobj2
if {![runto_main]} {
- return -1
+ return
}
set bp_location [gdb_get_line_number "STOP" "ctxobj-f.c"]
gdb_test "break ctxobj-f.c:$bp_location" \
"Breakpoint ${::decimal} at ${::hex}: .*" \
@@ -16,11 +16,11 @@
standard_testfile
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
untested "failed to compile"
- return -1
+ return
}
clean_restart
gdb_file_cmd ${binfile}
gdb_test_no_output "set listsize 1"
@@ -30,19 +30,19 @@ gdb_test "list" \
"{ /\\* main prologue \\*/" \
"list before run"
gdb_load ${binfile}
if {! [runto_main]} {
- return -1
+ return
}
gdb_test "list" \
"v0 = 0;" \
"list in main"
if {! [runto "func2"]} {
- return -1
+ return
}
gdb_test "list" \
"v2 = 2;" \
"list in func2"
@@ -56,10 +56,10 @@ gdb_test "list -1" \
# check the window
gdb_test_no_output "set listsize 3"
if {! [runto_main]} {
- return -1
+ return
}
gdb_test "list" \
"func1 \\(\\);" \
"list size 3"
@@ -16,15 +16,15 @@
# Test that the dcache can be flushed.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto func]} {
- return -1
+ return
}
gdb_test "up" ".* main .*"
gdb_test "p var1" " = 4"
gdb_test "p var2" " = 3"
@@ -16,15 +16,15 @@
# Test that dcache behaves correctly when reading a cache line fails.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto breakpt]} {
- return -1
+ return
}
# Issue the "delete mem" command. This makes GDB ignore the
# target-provided list, if any.
@@ -20,15 +20,15 @@
require !gdb_debug_enabled
standard_testfile .c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
for { set i 0 } { $i < 4 } { incr i } {
gdb_test_no_output "set variable array\[$i\] = $i"
}
@@ -18,15 +18,15 @@
require !gdb_debug_enabled
standard_testfile .c -2.c
set srcfiles [list $srcfile $srcfile2]
if {[prepare_for_testing "failed to prepare" $testfile $srcfiles]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Redirect debug output to file.
set logfile [host_standard_output_file gdb.txt]
gdb_test_no_output "set logging file $logfile" \
@@ -15,11 +15,11 @@
standard_testfile decl-before-def-decl.c decl-before-def-def.c
set sources [list $srcfile $srcfile2]
if {[prepare_for_testing "failed to prepare" $testfile $sources]} {
- return -1
+ return
}
# This is required due to PR25764.
gdb_test "maint expand-symtabs"
@@ -20,11 +20,11 @@
load_lib completion-support.exp
standard_testfile .c
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
clean_restart $testfile
# Basic/core tests using user-visible commands.
@@ -22,11 +22,11 @@
standard_testfile break.c break1.c
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
@@ -18,11 +18,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# A function to test that ALIAS is working as a shortcut of the "delete"
# command.
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -16,23 +16,23 @@
# This test tries to disassemble over the boundary between two compilation
# units displaying source lines. This checks that the disassemble routine
# can handle our use of line number 0 to mark the end of sequence.
if { [prepare_for_testing "failed to prepare" "disasm-end-cu" {disasm-end-cu-1.c disasm-end-cu-2.c} {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set main_addr [get_hexadecimal_valueof "&main" "0"]
set dummy_3_addr [get_hexadecimal_valueof "&dummy_3" "0"]
if {$main_addr == 0 || $dummy_3_addr == 0 || $dummy_3_addr <= $main_addr} {
fail "unable to extract required addresses, or addresses out of order"
- return -1
+ return
}
gdb_test_multiple "disassemble /m ${main_addr},${dummy_3_addr}" "disassemble address range with source" {
-re "Dump of assembler code from ${main_addr} to ${dummy_3_addr}:\r\nEnd of assembler dump\." {
fail "no output from the disassemble command"
@@ -18,15 +18,15 @@
require is_amd64_regs_target
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.S {nodebug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_sequence "disassemble /s main" \
"Disassemble main with source" {
"Dump of assembler code for function main:"
@@ -19,15 +19,15 @@
# by address returns a match even if no displaced stepping is currently
# taking place.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# We have a breakpoint at the current pc (from stopping at main). Step over
# the breakpoint.
gdb_test "stepi" ".*" "step-over breakpoint"
@@ -27,11 +27,11 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug nowarnings}]} {
- return -1
+ return
}
# Preserve the old timeout, and set a new one that should be
# sufficient to avoid timing out during this test.
set oldtimeout $timeout
@@ -33,11 +33,11 @@ if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \
if {[gdb_compile \
[list ${srcdir}/${subdir}/dmsym_main.c $dmsym_o] \
[standard_output_file ${testfile}] \
executable {debug}] != ""} {
untested "failed to compile"
- return -1
+ return
}
clean_restart ${testfile}
# Some convenient regular expressions...
@@ -15,11 +15,11 @@
standard_testfile break.c break1.c
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
# test document command used within user command.
gdb_test_multiple "define do-document" "" {
-re "Type commands for definition of \"do-document\".\r\nEnd with a line saying just \"end\".\r\n>$" {
@@ -17,11 +17,11 @@
standard_testfile
if {[build_executable "failed to prepare" \
${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
set dp_location [gdb_get_line_number "set dprintf here"]
proc test { style } {
@@ -26,11 +26,11 @@ require can_spawn_for_attach
standard_testfile
set escapedbinfile [string_to_regexp ${binfile}]
if {[build_executable "failed to prepare for dprintf-detach" \
${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
proc dprintf_detach_test { breakpoint_always_inserted dprintf_style disconnected_dprintf } {
set test_prefix "bai=${breakpoint_always_inserted} ds=${dprintf_style} dd=${disconnected_dprintf}"
global decimal gdb_prompt escapedbinfile
@@ -23,11 +23,11 @@
require target_can_use_run_cmd
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# This is the name of the GDB script to load.
set x_file ${srcdir}/${subdir}/$testfile.gdb
@@ -45,11 +45,11 @@ save_vars { GDBFLAGS } {
}
set test "load and run script with -x"
if { $res != 0} {
fail $test
- return -1
+ return
}
# The script loaded via -x contains a run command; while running, GDB
# is expected to print three messages from dprintf breakpoints along
# with three interspersed messages from an ordinary breakpoint (which
@@ -19,15 +19,15 @@ set expfile $testfile.exp
set dp_location [gdb_get_line_number "Set dprintf here"]
if {[prepare_for_testing "failed to prepare for dprintf with next" \
${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "dprintf $dp_location, \"%d\\n\", x" \
"Dprintf .*"
@@ -16,20 +16,20 @@
standard_testfile
set executable ${testfile}
if {[build_executable "failed to prepare for dprintf with non-stop" \
${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
clean_restart ${executable}
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "dprintf foo,\"At foo entry\\n\"" "Dprintf .*"
gdb_test "continue &" "Continuing\\."
@@ -25,11 +25,11 @@ set lib_opts debug
set exec_opts [list debug shlib=$lib_sl]
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
+ return
}
with_test_prefix "without format" {
clean_restart
@@ -18,18 +18,18 @@ standard_testfile
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/unbuffer_output.c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile $flags] } {
- return -1
+ return
}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set dp_location1 [gdb_get_line_number "set dprintf 1 here"]
if {![runto_main]} {
- return -1
+ return
}
gdb_test "dprintf" "Format string required"
gdb_test "dprintf foo" "Format string required"
@@ -92,11 +92,11 @@ remote_exec host "rm -f $filenames"
# Run target program until data structs are initialized.
if {![runto checkpoint1]} {
untested "couldn't run to checkpoint"
- return -1
+ return
}
# Get the endianness for the later use with endianless formats.
set endian [get_endianness]
@@ -35,11 +35,11 @@ if {![istarget *-*-linux*]
standard_testfile .S
set srcmainfile start.c
set executable ${testfile}
if {[build_executable ${testfile}.exp $executable [list ${srcfile} ${srcmainfile}] {}] == -1} {
- return -1
+ return
}
set test "rename section"
set objcopy_program [gdb_find_objcopy]
set result [catch {exec $objcopy_program --rename-section sect2=sect1 $binfile} output]
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [build_executable "failed to prepare" ${testfile}] } {
- return -1
+ return
}
# Setup for the test, create COUNT breakpoints at the function BREAKPT.
proc test_setup { count } {
global srcfile
@@ -20,11 +20,11 @@ require {!is_remote host}
standard_testfile
# Compile the test executable.
if {[build_executable "failed to build" $testfile $srcfile]} {
- return -1
+ return
}
set custom_signal_handle_re \
"warning: Found custom handler for signal $decimal \(\[^\r\n\]+\) preinstalled\."
set signal_dispositions_re \
@@ -52,11 +52,11 @@ if {[istarget "powerpc*"]} {
set compile_flags {debug nopie}
}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
$compile_flags]} {
- return -1
+ return
}
set address -1
# Get the address of the last insn in function eh2.
@@ -21,11 +21,11 @@
standard_testfile break.c break1.c
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile2]
@@ -43,10 +43,10 @@ gdb_test "print o" "= {v = 4, w = 3, x = 2, f = 1.5, cplx = 1.25 \\+ 7.25i, d =
if { !$test_sso } {
# The rest of the testcase requires Scalar Storage Order support.
# This compiler does not support it, so skip the rest.
unsupported "No scalar storage order support"
- return -1
+ return
}
gdb_test "x/x &o.v" "0x04000000"
gdb_test "x/xh &o.w" "0x0300"
@@ -26,11 +26,11 @@ standard_testfile
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/unbuffer_output.c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile $flags] } {
- return -1
+ return
}
remote_exec build "rm -f core"
set break1_line [gdb_get_line_number "-break1-"]
gdb_test "b ending-run.c:$break1_line" \
@@ -33,11 +33,11 @@ lappend opts additional_flags=-fshort-enums
lappend opts additional_flags=-nostdlib
lappend opts additional_flags=-DHAVE_BUILTIN_TRAP=[have_builtin_trap]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
@@ -16,11 +16,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Check the real contents.
set test "print e"
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[build_executable ${testfile}.exp $testfile] == -1} {
- return -1
+ return
}
set test "eu-strip"
set status [remote_exec build "eu-strip -f ${binfile}.debug $binfile"]
if {[lindex $status 0] != 0} {
@@ -27,9 +27,9 @@ if {[lindex $status 0] != 0} {
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_test "p callfunc (func)" " = 2" "infcall"
@@ -17,15 +17,15 @@
# flag set.
standard_testfile int-type.c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set sizeof_int [get_sizeof "int" 4]
gdb_test_no_output "set variable x=42" "set variable x=42"
@@ -17,15 +17,15 @@
# number in the 'x' command.
standard_testfile
if { [prepare_for_testing "failed to prepare for examine-backward" \
${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
proc get_first_mapped_address {} {
global gdb_prompt
@@ -29,11 +29,11 @@ if { [prepare_for_testing "prepare" $testfile $srcfile] != 0 } {
# Sanity-check: Verify that the executable exists. This is just to
# make sure that, when we verify later that the file does not exist,
# it really has been deleted.
if { ! [file exists $binfile] } {
fail "executable does not exist (${binfile})"
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -29,25 +29,25 @@ set exec1 [standard_output_file $testfile1]
set exec2 [standard_output_file $testfile2]
if { [gdb_compile [file join $srcdir $subdir $srcfile] $objfile \
object [list debug]] != "" } {
untested "failed to compile"
- return -1
+ return
}
if { [gdb_compile $objfile $exec1 executable {debug text_segment=0x1000000}] != ""
|| [gdb_compile $objfile $exec2 executable {debug text_segment=0x2000000}] != ""} {
untested "link failed"
- return -1
+ return
}
# First check whether the address of "main" in exec1 is readable in
# exec2. If it is, then skip the test as unsupported.
clean_restart $testfile1
if {![runto_main]} {
- return -1
+ return
}
set addr ""
set test "main address first"
gdb_test_multiple "p/x &main" $test {
@@ -57,11 +57,11 @@ gdb_test_multiple "p/x &main" $test {
}
}
clean_restart $testfile2
if {![runto_main]} {
- return -1
+ return
}
set cannot_access 0
set test "probe memory access"
gdb_test_multiple "x $addr" $test {
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Run to main, and execute BODY in the caller's context, with PREFIX
# set as test message prefix.
@@ -24,19 +24,19 @@
require {!target_info exists gdb,nosignals}
standard_testfile segv.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Run to main. But, before, change cwd to get the core into the
# output directory.
set_inferior_cwd_to_output_dir
if { ![runto_main] } {
- return -1
+ return
}
# Get the inferior's PID for later.
set pid [get_inferior_pid]
@@ -83,11 +83,11 @@ gdb_test "print \$_exitcode" " = void" \
# Now we test the behavior of $_exit{code,signal} during a normal
# inferior execution.
standard_testfile normal.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Checking $_exitsignal and $_exitcode, both should be void before the
# inferior is executed.
gdb_test "print \$_exitsignal" " = void" \
@@ -95,11 +95,11 @@ gdb_test "print \$_exitsignal" " = void" \
gdb_test "print \$_exitcode" " = void" \
"\$_exitcode is void before normal inferior is executed"
# Run the inferior until the end.
if { ![runto_main] } {
- return -1
+ return
}
gdb_continue_to_end
# Checking $_exitcode. It should be 0.
@@ -32,10 +32,10 @@ standard_testfile
# We intentionally compile the source file in twice.
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug $srcfile {debug additional_flags=-DFIRST} \
$srcfile debug]]} {
- return -1
+ return
}
set foo_bp [gdb_get_line_number "Break here"]
gdb_test "break $foo_bp" "Breakpoint.*" "expand psymtabs"
@@ -27,11 +27,11 @@ if {[is_remote host]} {
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable \
[list debug additional_flags=[quote_for_host -DOUTDIR=\"$outdir/\"]]] != "" } {
untested "failed to compile"
- return -1
+ return
}
set dir2 [standard_output_file dir2.fileio.test]
if {[file exists $dir2] && ![file writable $dir2]} {
system "chmod +w $dir2"
@@ -17,16 +17,16 @@
# on a name which is potentially both a symbol name and a file name.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if { ![readline_is_used] } {
unsupported "completion doesn't work when readline isn't used."
- return -1
+ return
}
# Test completion list for "filesy". We expect the immediate result to
# complete to "filesym"; completing again, we expect the symbol name and the
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto breakpt]} {
- return -1
+ return
}
# Basic attempt to read memory from globals.
gdb_test "x/5w global_var_1" \
"$hex:\[ \t\]+0\[ \t\]+0\[ \t\]+0\[ \t\]+0\r\n$hex:\[ \t\]+Cannot access memory at address $hex"
@@ -23,11 +23,11 @@ lappend opts debug
if { [have_fvar_tracking] } {
lappend opts "additional_flags=-fvar-tracking"
}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile $opts] } {
- return -1
+ return
}
proc finish_pretty { } {
if {![runto foo]} {
return
@@ -17,11 +17,11 @@
set allow_float_test [allow_float_test]
# re-use the program from the "return2" test.
if { [prepare_for_testing "failed to prepare" finish return2.c] } {
- return -1
+ return
}
proc finish_1 { type } {
global gdb_prompt
@@ -22,11 +22,11 @@
# Test floating-point related functionality.
#
if { [prepare_for_testing "failed to prepare" float float.c] } {
- return -1
+ return
}
# Set it up at a breakpoint so we have its registers.
if {![runto_main]} {
@@ -25,11 +25,11 @@ proc do_compile { {opts {}} } {
gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable $ccopts
}
if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
untested "compiler can't handle __float128 type?"
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
@@ -25,11 +25,11 @@ proc do_compile { {opts {}} } {
gdb_compile "${srcdir}/${subdir}/${srcfile}" "$binfile" executable $ccopts
}
if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
untested "compiler can't handle _FloatN/_FloatNx types?"
- return -1
+ return
}
clean_restart $testfile
if {![runto_main]} {
@@ -23,11 +23,11 @@ require {is_any_target "i?86-*-*" "x86_64-*-*"}
require allow_fork_tests
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
proc setup_gdb {} {
global testfile
@@ -20,11 +20,11 @@ require !gdb_debug_enabled
require allow_fork_tests
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Restart GDB and run the inferior to main. Return 1 on success, 0 on failure.
proc setup {} {
@@ -26,21 +26,21 @@ set binfile $testfile
set binfile2 ${testfile}-exit
set binfile3 vforked-prog
if {[build_executable "compile $binfile" $binfile $srcfile] == -1} {
untested "failed to compile first test binary"
- return -1
+ return
}
if {[build_executable "compile $binfile2" $binfile2 $srcfile2] == -1} {
untested "failed to compile second test binary"
- return -1
+ return
}
if {[build_executable "compile $binfile3" $binfile3 $srcfile3] == -1} {
untested "failed to compile third test binary"
- return -1
+ return
}
# If required, download the program that we exec after vfork to the
# remote target.
if { [is_remote target] } {
@@ -29,11 +29,11 @@ require !use_gdb_stub
require !gdb_debug_enabled
standard_testfile
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
- return -1
+ return
}
# This is the expected output for each of the test combinations
# below. The order here is important:
#
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "set language fortran" {Warning: the current language does not match this frame\.}
gdb_test "frame" ", aRGv=.*"
@@ -24,11 +24,11 @@ standard_testfile backtrace.c
set flags {}
lappend flags debug
lappend_include_file flags $srcdir/lib/attributes.h
if { [build_executable "failed to prepare" $testfile $srcfile $flags] } {
- return -1
+ return
}
# Unwind to each function in FRAMES, and compare "info frame" output
# to what was saved in the 'info_frame_before' array.
proc compare_frames {frames} {
@@ -17,11 +17,11 @@
# 'select-frame', and 'info frame' commands.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
- return -1
+ return
}
runto_main
gdb_breakpoint frame_2
gdb_continue_to_breakpoint frame_2
@@ -72,11 +72,11 @@ proc check_unwinder_class { unwinder_class state {testname ""} } {
}
}
}
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto_main]} {
untested "couldn't run to main"
return
@@ -19,11 +19,11 @@
# Test 'frame apply [all | COUNT | -COUNT | level LEVEL...] [FLAG]... COMMAND'.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto setup_done]} {
return 0
}
@@ -44,11 +44,11 @@
# suggestions for improving this.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test "break ${srcfile}:[gdb_get_line_number "euphonium"]" ".*" \
"set breakpoint"
@@ -25,16 +25,16 @@ require {!is_remote host}
# Create a temporary file in the build directory. Use a different
# filename in case ${srcdir} == ${objdir}.
if { [catch {file copy -force ${srcdir}/${subdir}/${srcfile} \
[standard_output_file tmp-${srcfile}]}] != 0 } {
error "Could not create temporary file"
- return -1
+ return
}
# Build the test executable using an absolute path.
if { [gdb_compile [standard_output_file tmp-${srcfile}] "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
# Unlike most GDB tests, we do not use gdb_reinitialize_dir in this script.
# We're testing GDB's ability to find files in other ways.
@@ -65,11 +65,11 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
}
# Build the test executable using a relative path.
if { [gdb_compile [relative_filename [pwd] [build_standard_output_file tmp-${srcfile}]] \
"${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart $testfile
set msg "set breakpoint by full path before loading symbols - built relative"
@@ -19,11 +19,11 @@ standard_testfile .c fullpath-expand-func.c
# directory.
require {!is_remote host}
if { [file pathtype $objdir] != "absolute" } {
untested "objdir $objdir is not absolute"
- return -1
+ return
}
with_cwd $srcdir {
set err [gdb_compile "${subdir}/${srcfile} ${subdir}/${srcfile2}" $binfile executable {debug}]
@@ -34,11 +34,11 @@ with_cwd $srcdir {
}
set result [catch {exec realpath ${srcdir}/${subdir}/${srcfile2}} realsrcfile2]
if { $result != 0 || $realsrcfile2 == "" } {
untested "invalid realpath of ${srcfile2}: result $result output $realsrcfile2"
- return -1
+ return
}
clean_restart ${testfile}
gdb_test "rbreak $realsrcfile2:func" \
@@ -16,11 +16,11 @@
# This testcase exercises bug 15695.
# Trying to print foo->bar if foo is a pointer to a typedef of a pointer
# to a function will put gdb into an infinite loop.
if { [prepare_for_testing "failed to prepare" "func-ptr" {func-ptr.c} {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set testname func-ptrs
set srcfile ${testname}.c
if { [prepare_for_testing "failed to prepare" ${testname} ${srcfile}] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
# First set our breakpoints.
@@ -26,11 +26,11 @@ if {[support_complex_tests]} {
}
set allow_float_test [allow_float_test]
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $compile_flags]} {
- return -1
+ return
}
#
# Locate actual args; integral types.
#
@@ -30,10 +30,10 @@ if { [prepare_for_testing "prepare" $filename $srcfile] != 0 } {
gdb_test_no_output "set args ${pattern}" \
"set buffer exceeding arguments"
if {![runto_main]} {
- return -1
+ return
}
gdb_gcore_cmd [standard_output_file gcore-buffer-overflow.test] \
"save a corefile"
@@ -19,11 +19,11 @@ require {istarget "*-*-linux*"}
require can_spawn_for_attach
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
# Read the proc_pid_status page, to find how much memory the given
# PID is using. This is meant to be used to find the
# memory usage for the GDB in this test.
@@ -19,20 +19,20 @@
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pie "ldflags=-Wl,-z,relro"}]} {
- return -1
+ return
}
set stripped_binfile ${binfile}.stripped
set gcorefile ${binfile}.gcore
set strip_program [transform strip]
remote_file host delete ${stripped_binfile}
if {[run_on_host "strip" "$strip_program" "-g -o ${stripped_binfile} $binfile"]} {
- return -1
+ return
}
# Workaround PR binutils/10802:
# Preserve the 'x' bit also for PIEs (Position Independent Executables).
set perm [file attributes ${binfile} -permissions]
@@ -41,15 +41,15 @@ file attributes ${stripped_binfile} -permissions $perm
clean_restart
gdb_load $stripped_binfile
# The binary is stripped of debug info, but not minsyms.
if {![runto break_here]} {
- return -1
+ return
}
if {![gdb_gcore_cmd $gcorefile "save a corefile"]} {
- return -1
+ return
}
# Now restart gdb with the unstripped binary and load the corefile.
clean_restart $testfile
@@ -18,25 +18,25 @@
# and then try to debug the core with the unstripped version.
standard_testfile
if { [have_fuse_ld_gold] == 0} {
- return -1
+ return
}
if {[build_executable "failed to prepare" $testfile $srcfile \
{debug pie "ldflags=-fuse-ld=gold"}]} {
- return -1
+ return
}
set stripped_binfile ${binfile}.stripped
set gcorefile ${binfile}.gcore
set strip_program [transform strip]
remote_file host delete ${stripped_binfile}
if {[run_on_host "strip" "$strip_program" "-g -o ${stripped_binfile} $binfile"]} {
- return -1
+ return
}
# Workaround PR binutils/10802:
# Preserve the 'x' bit also for PIEs (Position Independent Executables).
set perm [file attributes ${binfile} -permissions]
@@ -45,15 +45,15 @@ file attributes ${stripped_binfile} -permissions $perm
clean_restart
gdb_load $stripped_binfile
# The binary is stripped of debug info, but not minsyms.
if {![runto break_here]} {
- return -1
+ return
}
if {![gdb_gcore_cmd $gcorefile "save a corefile"]} {
- return -1
+ return
}
# Now restart gdb with the unstripped binary and load the corefile.
clean_restart $testfile
@@ -19,15 +19,15 @@
require gcore_cmd_available
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break terminal_func" "Breakpoint .* at .*${srcfile}, line .*" \
"set breakpoint at terminal_func"
@@ -17,20 +17,20 @@
# command.
standard_testfile
if {[prepare_for_testing "prepare for test" $testfile $srcfile] == -1} {
- return -1
+ return
}
# This test isn't going to work when the board file automatically adds
# an index section, or if the debug information is split into a
# separate objfile.
set index_type [get_index_type $binfile "check debug style"]
if { $index_type ne "cooked" } {
unsupported "cannot test without a cooked index"
- return -1
+ return
}
# The name of a directory that doesn't exist.
set bad_dir [standard_output_file "non-existent"]
@@ -24,11 +24,11 @@ standard_testfile
# The test program exits after a while, in case GDB crashes. Make it
# wait at least as long as we may wait before declaring a time out
# failure.
set options { "additional_flags=-DTIMEOUT=$timeout" debug }
if { [build_executable ${testfile}.exp ${testfile} $srcfile $options] == -1 } {
- return -1
+ return
}
# Return 0 on success, non-zero otherwise.
proc do_test { pass } {
@@ -23,11 +23,11 @@
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 1
}
@@ -25,11 +25,11 @@ standard_testfile
if { ![test_compiler_info gcc*] } {
return 0
}
if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
return
@@ -28,11 +28,11 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
- return -1
+ return
}
# Disable hardware watchpoints if necessary.
if {!$allow_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
@@ -23,11 +23,11 @@
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -17,11 +17,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
proc test_convenience_variables {} {
global gdb_prompt
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[build_executable ${testfile}.exp $testfile]} {
- return -1
+ return
}
set pipeline_counter 0
set objcopy_program [gdb_find_objcopy]
@@ -67,72 +67,72 @@ proc pipeline {test args} {
remote_file host delete ${binfile}.dynsyms
if {[pipeline "nm -D" \
[list [transform nm] "-D ${binfile} --format=posix --defined-only"] \
[list awk "\\{print\\ \\\$1\\}"] \
[list sort "" "" "${binfile}.dynsyms"]]} {
- return -1
+ return
}
# Extract all the text (i.e. function) symbols from the debuginfo.
# (Note that we actually also accept "D" symbols, for the benefit
# of platforms like PowerPC64 that use function descriptors.)
remote_file host delete ${binfile}.funcsyms
if {[pipeline "nm" \
[list [transform nm] "${binfile} --format=posix --defined-only"] \
[list awk "\\{if(\\\$2==\"T\"||\\\$2==\"t\"||\\\$2==\"D\")print\\ \\\$1\\}"] \
[list sort "" "" "${binfile}.funcsyms"]]} {
- return -1
+ return
}
# Keep all the function symbols not already in the dynamic symbol
# table.
remote_file host delete ${binfile}.keep_symbols
if {[run_on_host "comm" "comm" "-13 ${binfile}.dynsyms ${binfile}.funcsyms" "" \
"${binfile}.keep_symbols"]} {
- return -1
+ return
}
# GDB specific - we do not have split executable in advance.
remote_file host delete ${binfile}.strip
if {[run_on_host "strip" [transform strip] \
"--strip-all -R .comment -o ${binfile}.strip ${binfile}"]} {
- return -1
+ return
}
# Separate full debug info into ${binfile}.debug.
remote_file host delete ${binfile}.debug
if {[run_on_host "copydebug" ${objcopy_program} \
"--only-keep-debug ${binfile} ${binfile}.debug"]} {
- return -1
+ return
}
# Copy the full debuginfo, keeping only a minimal set of symbols and
# removing some unnecessary sections.
remote_file host delete ${binfile}.mini_debuginfo
if {[run_on_host "objcopy 1" ${objcopy_program} "-S --remove-section .gdb_index --remove-section .comment --keep-symbols=${binfile}.keep_symbols ${binfile}.debug ${binfile}.mini_debuginfo"]} {
- return -1
+ return
}
# Add the .gnu_debuglink section to the .gnu_debugdata file.
# .gnu_debuglink is normally not present in the .gnu_debugdata section but in
# some files there may be PT_NOTE with NT_GNU_BUILD_ID and GDB could look up
# the .debug file from it. This is only an additional test of GDB, such link
# is not present in usual MiniDebugInfo sections.
if {[run_on_host "addlink" ${objcopy_program} \
"--add-gnu-debuglink=${binfile}.debug ${binfile}.mini_debuginfo ${binfile}.mini_debuginfo-debuglink"]} {
- return -1
+ return
}
# Inject the compressed data into the .gnu_debugdata section of the
# original binary.
remote_file host delete ${binfile}.mini_debuginfo-debuglink.xz
if {[run_on_host "xz" "xz" "-k ${binfile}.mini_debuginfo-debuglink"]} {
- return -1
+ return
}
remote_file host delete ${binfile}.test
if {[run_on_host "objcopy 2" ${objcopy_program} "--add-section .gnu_debugdata=${binfile}.mini_debuginfo-debuglink.xz ${binfile}.strip ${binfile}.test"]} {
- return -1
+ return
}
clean_restart "$testfile.strip"
gdb_test "p debugdata_function" \
@@ -41,11 +41,11 @@ if { [do_compile {-mcpu=native}] != ""
}
clean_restart $testfile
if { ![runto_main] } {
- return -1
+ return
}
# Get endianess for the scalar->vector casts
set endian [get_endianness]
@@ -17,11 +17,11 @@ require !gdb_protocol_is_remote
require can_spawn_for_attach
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
set command "$binfile"
set res [remote_spawn host $command]
if { ![gdb_assert { ![expr {$res < 0 || $res == ""}] } "spawn inferior"] } {
@@ -32,11 +32,11 @@ close $fd
# The choice of path name for the source file is important in order to trigger
# the bug. Using $new_srcfile here won't trigger the bug.
set compile_name [relative_filename $objdir $new_srcfile]
if { [gdb_compile $compile_name "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
set bp_location [gdb_get_line_number "set breakpoint here" $new_srcfile]
@@ -29,11 +29,11 @@ puts $fd "#line 2 \"///${new_srcfile}\""
puts $fd "int main () { return 0; } /* set breakpoint here */"
close $fd
if { [gdb_compile $new_srcfile "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
set bp_location [gdb_get_line_number "set breakpoint here" ${new_srcfile}]
@@ -30,11 +30,11 @@ puts $fd "#line 2 \"./$relative\""
puts $fd "int main () { return 0; } /* set breakpoint here */"
close $fd
if { [gdb_compile $new_srcfile "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
set bp_location [gdb_get_line_number "set breakpoint here" $new_srcfile]
@@ -37,11 +37,11 @@ if { [prepare_for_testing "prepare" $testfile $main_src $exec_opts] != 0 } {
}
gdb_load_shlib $lib_so
if {![runto_main]} {
- return -1
+ return
}
# Get main breakpoint out of the way.
delete_breakpoints
@@ -16,15 +16,15 @@
require allow_hw_breakpoint_tests
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# If we can read the memory at address 0, skip the test.
if { [is_address_zero_readable] } {
untested "memory at address 0 is readable"
@@ -16,15 +16,15 @@
require allow_hw_breakpoint_tests
set test hbreak
set srcfile ${test}.c
if { [prepare_for_testing "failed to prepare" ${test} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set breakline [gdb_get_line_number "break-at-exit"]
gdb_test "hbreak ${srcfile}:${breakline}" \
@@ -18,11 +18,11 @@
# Only one hardware breakpoint is set at a time as targets may limit
# the number available.
if { [prepare_for_testing "failed to prepare" "hbreak2" {break.c break1.c} {debug nowarnings}] } {
- return -1
+ return
}
set srcfile break.c
set srcfile1 break1.c
if {![runto_main]} {
@@ -515,11 +515,11 @@ test_next_with_recursion
# Build a new file with optimization enabled so that we can try breakpoints
# on targets with optimized prologues.
if { [prepare_for_testing "failed to prepare" "hbreak2o2" {break.c break1.c} {debug nowarnings optimize=-O2}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -55,11 +55,11 @@ gdb_exit
gdb_start
# These tests require readline support.
if { ![readline_is_used] } {
unsupported "readline isn't used."
- return -1
+ return
}
# By default the option is set to 0.
gdb_test "show history remove-duplicates" "is 0\\."
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [build_executable ${testfile}.exp "${testfile}" $srcfile {debug nowarnings}] } {
- return -1
+ return
}
# Define the hook-stop that runs COMMANDS.
proc define_hook_stop {commands} {
@@ -21,15 +21,15 @@
require allow_hw_breakpoint_tests
set test hbreak
set srcfile ${test}.c
if { [prepare_for_testing "failed to prepare" ${test} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
delete_breakpoints
gdb_test_no_output "set breakpoint always-inserted on"
@@ -16,11 +16,11 @@
# C test-case that mimics gdb.ada/dgopt.exp.
standard_testfile .c main.c
if { [build_executable "failed to prepare" $testfile $srcfile {debug}] } {
- return -1
+ return
}
clean_restart
# Set language explicitly, to avoid expanding the include-main.c CU for the
@@ -17,11 +17,11 @@ if { [is_remote host] } {
gdb_remote_download host $srcdir/$subdir/included.h
}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test_no_output "set listsize 1"
gdb_test "list -q main" ".*"
@@ -22,23 +22,23 @@ set testfile2 "infcall-exec2"
set srcfile2 "${testfile2}.c"
set binfile2 [standard_output_file $testfile2]
# Build the two executables for the test.
if {[build_executable "build exec'd file" $testfile2 $srcfile2] != 0} {
- return -1
+ return
}
if {[prepare_for_testing "prepare" $testfile $srcfile] != 0} {
- return -1
+ return
}
if { [is_remote target] } {
set binfile2 [gdb_remote_download target $binfile2]
}
if {![runto_main]} {
- return -1
+ return
}
set linenr [gdb_get_line_number "break here"]
gdb_breakpoint $linenr
gdb_continue_to_breakpoint "Ensure PATH is set" ".* break here .*"
@@ -19,15 +19,15 @@
standard_testfile
require {!target_info exists gdb,cannot_call_functions}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Run an infcall that takes a little bit to complete.
send_gdb "print some_function()\n"
@@ -18,11 +18,11 @@ require allow_fork_tests
require support_displaced_stepping
standard_testfile .c
if { [build_executable "failed to build" ${testfile} ${testfile}.c] } {
- return -1
+ return
}
save_vars { GDBFLAGS } {
append GDBFLAGS " -ex \"set non-stop on\""
clean_restart $testfile
@@ -16,11 +16,11 @@
# Script to test floating point infinities and NaNs.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
runto_main
gdb_test "print a" "${::valnum_re} = inf"
@@ -27,11 +27,11 @@
# ...
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -17,15 +17,15 @@ standard_testfile .c
# Fission doesn't support macros yet. Bug 15954.
require !using_fission
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug macros}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Test various error messages.
gdb_test "info macro -- -all" \
"The symbol `-all' has no definition .*\r\nat .*$srcfile:${::decimal}"
@@ -16,23 +16,23 @@
standard_testfile .c
# This test is Linux-only.
if {![istarget *-*-linux*]} {
unsupported "info-os.exp"
- return -1
+ return
}
# Support for XML-output is needed to run this test.
require allow_xml_test
# Compile test program.
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Get PID of test program.
set inferior_pid ""
set test "get inferior process ID"
@@ -58,11 +58,11 @@ if { ! [use_gdb_stub] } {
# Set another environment variable, this time using a GDB command,
# to test "info proc environ".
gdb_test "set environment GDB_INFO_PROC_ENVIRON_2 TWO"
if {![runto_main]} {
- return -1
+ return
}
gdb_test "info proc" "process ${decimal}.*" "info proc with process"
gdb_test "info proc mapping" \
@@ -25,16 +25,16 @@ set lib2name $testfile-solib2
set srcfile_lib2 $srcdir/$subdir/$lib2name.c
set binfile_lib2 [standard_output_file $lib2name.so]
if { [gdb_compile_shlib $srcfile_lib1 $binfile_lib1 {}] != "" } {
untested "failed to compile shared library 1"
- return -1
+ return
}
if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 {}] != "" } {
untested "failed to compile shared library 2"
- return -1
+ return
}
set binfile_lib1_target [gdb_download_shlib $binfile_lib1]
set binfile_lib2_target [gdb_download_shlib $binfile_lib2]
@@ -42,11 +42,11 @@ set define2 -DSHLIB2_NAME=\"$binfile_lib2_target\"
set define1 -DSHLIB1_NAME=\"$binfile_lib1_target\"
set cflags "$define1 $define2"
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
[list additional_flags=$cflags shlib_load]] } {
- return -1
+ return
}
gdb_locate_shlib $binfile_lib1
gdb_locate_shlib $binfile_lib2
@@ -15,11 +15,11 @@
standard_testfile start.c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
set eol "\r\n"
# Check the output of "info target". Note that we are not interested
@@ -17,11 +17,11 @@
standard_testfile info-var-f1.c info-var-f2.c
if {[prepare_for_testing "failed to prepare" \
"${testfile}" "$srcfile $srcfile2" "debug"]} {
- return -1
+ return
}
# Note: we do not run to main, as otherwise, the output of info variables
# can be very long, showing thousands of glibc variables.
# This long output then causes expect's buffer to overflow.
@@ -22,11 +22,11 @@ set testfile info_minsym
standard_testfile info_minsym.c
# Compile the program without debugging information, to have minimal symbols.
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {c}]} {
- return -1
+ return
}
gdb_test_no_output "info variables -q -t int minsym" \
"minsym variables do not match type"
gdb_test_no_output "info functions -q -t int minsym" \
@@ -22,11 +22,11 @@
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
if {![runto setup_done]} {
return 0
}
@@ -18,11 +18,11 @@
standard_testfile .c info_sources_base.c
if {[prepare_for_testing $testfile.exp $testfile \
[list $srcfile $srcfile2] debug]} {
untested $testfile.exp
- return -1
+ return
}
# Executes "info sources ARGS".
#
# EXPECT_SEEN_INFO_SOURCES 1 indicates that the source file info_sources.c
@@ -67,11 +67,11 @@ proc test_info_sources {args expect_seen_info_sources \
}
}
}
if {![runto_main]} {
- return -1
+ return
}
# List both files with no regexp:
with_test_prefix "in main" {
test_info_sources "" 1 1
@@ -35,11 +35,11 @@ if { [prepare_for_testing "prepare" $testfile $srcfile \
set solib_name [gdb_load_shlib $solib_name]
if {![runto foo]} {
untested "failed to run to function foo"
- return -1
+ return
}
# Invoke 'info sources EXTRA_ARGS' and extract the results.
# The results are then compared to the list ARGS.
#
@@ -36,11 +36,11 @@ if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \
lappend opts $ld_flags
}
if {[build_executable $testfile.exp $testfile $srcfile $opts] == -1} {
untested "failed to compile"
- return -1
+ return
}
clean_restart
# Load symbols at an offset 0xffff0000 using add-symbol-file
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
# Verify that the "info line" command does not skip function prologues.
# If it did, GDB would tell us that the line we're interested in starts
# at <twice+N> where N is different from zero.
@@ -52,11 +52,11 @@
standard_testfile
require allow_python_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -16,11 +16,11 @@
# interp.exp Test interpreter-exec command
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {debug}] } {
- return -1
+ return
}
# Do not use gdb_test for this test, since it has two prompts.
gdb_test_multiple "interpreter-exec mi \"-var-update *\"" "" {
-re "\\^done,changelist=\\\[\\\]\r\n$gdb_prompt " {
@@ -17,15 +17,15 @@
standard_testfile .c
set executable ${testfile}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_multiple "continue &" "" {
-re "Continuing\\.\r\n$gdb_prompt " {
pass $gdb_test_name
@@ -21,11 +21,11 @@ require {!target_info exists gdb,nointerrupts}
require can_spawn_for_attach
standard_testfile
if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] == -1 } {
- return -1
+ return
}
proc do_test {} {
global binfile
global decimal
@@ -19,11 +19,11 @@
require allow_fork_tests
standard_testfile
if {[build_executable "failed to build" $testfile $srcfile {debug}]} {
- return -1
+ return
}
# The test proper.
proc do_test {} {
@@ -15,18 +15,18 @@
standard_testfile
if {[prepare_for_testing "failed to prepare for testing" \
${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
# Pretend there's no terminal.
gdb_test_no_output "set interactive-mode off"
if {![runto_main]} {
- return -1
+ return
}
# Delete breakpoints so that the next resume is a plain continue,
# instead of a step-over-breakpoint sequence just while GDB sends the
# interrupt request. If that's buggy on some targets (and it was on
@@ -27,11 +27,11 @@ if { ! [target_info exists gdb,nosignals] } {
lappend options "additional_flags=-DSIGNALS"
}
if {[build_executable $testfile.exp $testfile $srcfile $options] == -1} {
untested "failed to compile"
- return -1
+ return
}
gdb_start
@@ -18,11 +18,11 @@ require can_spawn_for_attach
standard_testfile .c
set executable ${testfile}
if { [build_executable ${testfile}.exp $executable $srcfile \
[list debug pthreads pie]] } {
- return -1
+ return
}
# Start the program running and then wait for a bit, to be sure
# that it can be attached to.
@@ -79,20 +79,20 @@ set srcfile_dl $testfile-dl.c
set binfile_dl $binfile-dl
set options [list debug shlib=${binfile_lib}]
if {[gdb_compile ${srcdir}/${subdir}/${srcfile_dl} $binfile_dl executable \
$options] == -1 } {
untested "failed to compile"
- return -1
+ return
}
# Build the program that loads *two* JIT libraries.
set binfile_dl2 $binfile-dl2
set options [list debug shlib=${binfile_lib} shlib=${binfile_lib2}]
if {[gdb_compile ${srcdir}/${subdir}/${srcfile_dl} $binfile_dl2 executable \
$options] == -1 } {
untested "failed to compile two-jitter binary"
- return -1
+ return
}
# STANDALONE is true when the JIT reader is included directly in the
# main program. False when the JIT reader is in a separate shared
# library. If CHANGE_ADDR is true, force changing the JIT descriptor
@@ -35,21 +35,21 @@ set jit_reader_header [standard_output_file "../../../../../gdb/jit-reader.h"]
set jit_reader_flag "-DJIT_READER_H=\"$jit_reader_header\""
if { [gdb_compile "${srcdir}/${subdir}/${jit_host_src}" "${jit_host_bin}" \
executable [list debug additional_flags=$jit_reader_flag]] != "" } {
untested "failed to compile"
- return -1
+ return
}
set jit_reader jit-reader
set jit_reader_src ${jit_reader}.c
set jit_reader_bin [standard_output_file ${jit_reader}.so]
if { [gdb_compile_shlib "${srcdir}/${subdir}/${jit_reader_src}" "${jit_reader_bin}" \
[list debug additional_flags=$jit_reader_flag]] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Test "info registers" in the current frame, expecting RSP's value to
# be SP.
@@ -16,15 +16,15 @@
# Test support for jump in inline functions.
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "inline-funct"]
gdb_continue_to_breakpoint "inline-funct" ".*inline-funct.*"
@@ -17,11 +17,11 @@
clear_xfail "*-*-*"
standard_testfile .c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
# General testing of the 'jump' command. GDB is already started.
# There might be multiple inferior in the current debug session, in
# which case, the relevant inferior is already selected.
@@ -97,11 +97,11 @@ if {![use_gdb_stub]} {
set num_inferiors 2
}
# Run to main, add inferiors if needed.
if {![runto_main]} {
- return -1
+ return
}
for {set inf 2} {$inf <= $num_inferiors} {incr inf} {
# Start a new inferior, and run it with the same executable.
gdb_test "add-inferior -exec ${binfile}" \
"Added inferior ${inf}.*" \
@@ -20,15 +20,15 @@
standard_testfile .c -foo.c .h
if { [prepare_for_testing "failed to prepare" $testfile \
[list ${srcfile} ${srcfile2}]] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
set bar_first_line [gdb_get_line_number "bar-first-line" ${srcfile3}]
set bar_middle_line [gdb_get_line_number "bar-middle-line" ${srcfile3}]
@@ -18,17 +18,17 @@ standard_testfile .c
require can_single_step_to_signal_handler
require {!target_info exists gdb,nosignals}
if {[prepare_for_testing "failed to prepare" ${testfile}]} {
- return -1
+ return
}
gdb_test "handle SIGUSR1 stop print pass" "SIGUSR1\[ \t\]+Yes\[ \t\]+Yes\[ \t\]+Yes\[ \t\]+.*"
if {![runto_main]} {
- return -1
+ return
}
gdb_test "continue" "Program received signal SIGUSR1, .*"
set test "handler"
@@ -23,11 +23,11 @@ require allow_multi_inferior_tests
standard_testfile
set executable $testfile
if {[prepare_for_testing "failed to prepare" $executable]} {
- return -1
+ return
}
runto_main
# Add another forked inferior process.
@@ -42,11 +42,11 @@ if { [istarget "*-*-linux*"] && [target_info gdb_protocol] == ""} {
set flags {}
lappend flags debug
lappend flags additional_flags=-DBINFILE=$binfile
if {[build_executable "failed to prepare" $testfile $srcfile $flags] == -1} {
- return -1
+ return
}
set checkpoint_line [gdb_get_line_number "Checkpoint here"]
# Start an inferior, which blocks in a spin loop. Setup a Python
@@ -78,11 +78,11 @@ proc test {cmds_after_kill} {
}
}
}
if {[build_executable "failed to prepare" $testfile $srcfile] == -1} {
- return -1
+ return
}
# The actual output GDB prints in response to commands after the
# inferior is gone isn't very well defined, and will depend on target.
# What we're trying to make sure is that GDB doesn't internal error or
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -33,9 +33,9 @@ gdb_test_multiple "l main:L1" "" {
set supported 1
}
}
if { ! $supported } {
- return -1
+ return
}
gdb_test "break main:L1" "Location main:L1 not available"
@@ -18,11 +18,11 @@
#
standard_testfile .c
if { [prepare_for_testing "failed to prepare" $testfile ${srcfile} debug] } {
- return -1
+ return
}
if {![runto_main]} {
return -1
@@ -22,11 +22,11 @@ if {[is_remote host]} {
}
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2 $srcfile3] {debug}]} {
- return -1
+ return
}
set oldtimeout $timeout
set timeout 10
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set testfile ldbl_e308
set srcfile ${testfile}.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set variable ldbl_308 = 1.6e+308l"
gdb_test "print ldbl_308" \
@@ -16,11 +16,11 @@
# Test GDB's limited array printing.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
if {![runto_main]} {
perror "couldn't run to breakpoint"
continue
@@ -19,15 +19,15 @@ standard_testfile .c line-symtabs.h
if { [is_remote host] } {
gdb_remote_download host $srcdir/$subdir/$srcfile2
}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# PR 17559: gdb_disassembly was using the wrong symtab lookup function.
# It was expecting the symtab of the source file containing $pc,
# instead it was getting the primary symtab of that compilation unit.
@@ -18,11 +18,11 @@
# command succeeds, we will not try to actually run to that line.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test "break $srcfile:65535" \
".*Breakpoint 1 at .*: file .*$srcfile, line 65535\\..*" \
"break at line 65535"
@@ -22,11 +22,11 @@ standard_testfile list-ambiguous0.c list-ambiguous1.c
# editor.
setenv EDITOR true
if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \
{debug}]} {
- return -1
+ return
}
# Build source listing pattern based on an inclusive line range.
proc line_range_pattern { range_start range_end } {
@@ -17,11 +17,11 @@
# program is started.
standard_testfile list-ambiguous0.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
set fill "${decimal}\\s+\[^\n\r\]+"
gdb_test_no_output "set listsize 10"
@@ -34,11 +34,11 @@ set srcfile [remote_download host $srcfile]
# Compile the source file.
set options "debug"
if { [gdb_compile "${srcfile}" "${binfile}" \
executable $options] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Now delete the source file.
remote_file host delete $srcfile
@@ -21,11 +21,11 @@ standard_testfile .c -2.c
if { [prepare_for_testing_full "failed to prepare" \
[list \
$testfile {} \
$srcfile {nodebug} \
$srcfile2 {debug}]] } {
- return -1
+ return
}
if {![runto_main]} {
untested "couldn't run to main"
return
@@ -21,11 +21,11 @@ standard_testfile list0.c list1.c
# Need to download the header to the host.
gdb_remote_download host ${srcdir}/${subdir}/list0.h
if {[build_executable "failed to prepare" $testfile [list $srcfile $srcfile2] \
{debug}]} {
- return -1
+ return
}
# The last line in the file.
set last_line [gdb_get_line_number "last line" "list0.c"]
@@ -26,15 +26,15 @@ if {[gdb_protocol_is_native]} {
# would have to manually specify an offset to load.
set opts {debug nopie}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Manually change the value of the_variable.
gdb_test "print/x the_variable" " = 0x1234" "check initial value of the_variable"
gdb_test_no_output "set the_variable = 0x5555" "manually change the_variable"
@@ -31,11 +31,11 @@
require {!target_info exists gdb,noinferiorio}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile {} {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -16,10 +16,10 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile {debug quiet}] } {
- return -1
+ return
}
# 64-bit array size should not overflow
gdb_test "print &f->buf" {= \(char \(\*\)\[1099494850560\]\) 0x0}
@@ -24,11 +24,11 @@ set options {debug macros additional_flags=-DFROM_COMMANDLINE=ARG}
# have access to the .debug_macinfo section.
if {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \
object $options] != ""
|| [gdb_compile "${objfile}" "${binfile}" executable $options] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
@@ -19,11 +19,11 @@
standard_testfile main.c
require !readnow
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
require {string eq [have_index $binfile] ""}
gdb_test_no_output "maint info symtabs"
@@ -18,11 +18,11 @@
standard_testfile .c
if {[build_executable "failed to prepare" $testfile \
$srcfile {debug nowarnings}]} {
- return -1
+ return
}
clean_restart
# Make sure that no symtabs are expanded, by setting language before
# loading exec.
@@ -30,11 +30,11 @@ gdb_test_no_output "set language c"
gdb_load ${binfile}
set test "verify no symtabs are expanded"
if { [readnow] } {
unsupported $test
- return -1
+ return
}
gdb_test_no_output "maint info symtabs" $test
# Expand the header file symtab.
gdb_test_no_output "maint expand-symtabs maint-expand-symbols-header-file.h"
@@ -18,11 +18,11 @@
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
{debug nopie}]} {
- return -1
+ return
}
if {![runto normal_func]} {
return 0
}
@@ -20,15 +20,15 @@ load_lib completion-support.exp
standard_testfile break.c break1.c
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Check the output of 'maint info target-sections' command.
proc check_maint_info_target_sections_output {prefix} {
global hex gdb_prompt
@@ -17,15 +17,15 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile \
$srcfile {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint foo
gdb_continue_to_breakpoint "run to foo"
@@ -45,11 +45,11 @@
standard_testfile break.c break1.c
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
# Check "maint set per-command" warnings. We do this early so that
# the following tests don't need to expect them, as GDB only warns
# once.
@@ -65,11 +65,11 @@ proc prepare_test_source_file { count } {
# Build a source file and compile it.
set filename [prepare_test_source_file 250]
standard_testfile $filename
if {[prepare_for_testing "failed to prepare" "$testfile" $srcfile \
{ debug }]} {
- return -1
+ return
}
# Start the test.
if {![runto_main]} {
return
@@ -25,11 +25,11 @@ if { [target_info gdb_protocol] != "" } {
}
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Generate core file.
set corefile [core_find $binfile]
if {$corefile == ""} {
@@ -47,11 +47,11 @@ catch {
"ulimit -s $stack_limit;" \
")"]
} msg
if { "$msg" != "" } {
untested "Can't set stack limit"
- return -1
+ return
}
set cmd \
[concat \
"(" \
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -18,11 +18,11 @@
# Test the memory attribute commands.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
runto_main
# Delete all target-supplied memory regions.
@@ -19,16 +19,16 @@
standard_testfile
set options "-fno-builtin-memset -fno-builtin-memcpy -fno-builtin-memmove"
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
[list debug additional_flags=$options]] } {
- return -1
+ return
}
set linespec ${srcfile}:[gdb_get_line_number "Break here"]
if {![runto ${linespec}]} {
- return -1
+ return
}
gdb_test "watch -location a\[28\]" \
"(Hardware w|W)atchpoint ${decimal}: -location a\\\[28\\\]" \
"set watch on a"
@@ -17,11 +17,11 @@
set u_msg "Memory tagging not supported or disabled by the current architecture\."
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {[target_info gdb_protocol] == "extended-remote"} {
# Make sure we're disconnected, in case we're testing with an
# extended-remote board, therefore already connected.
@@ -38,18 +38,18 @@ with_test_prefix "before program execution" {
}
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
# Targets that don't support memory tagging should not execute the
# runtime memory tagging tests.
if {![supports_memtag]} {
unsupported "memory tagging unsupported"
- return -1
+ return
}
# With the program running, try to use the memory tagging commands.
with_test_prefix "during program execution" {
set msg "Argument required \\(address or pointer\\)\."
@@ -22,11 +22,11 @@ set options debug
if {[test_compiler_info gcc-*-*]} {
lappend options additional_flags=-O2 additional_flags=-fno-inline
}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options]} {
- return -1
+ return
}
if {[runto middle]} {
# PR 3016
# warning: Hit heuristic-fence-post without finding
@@ -20,15 +20,15 @@ require {have_compile_flag -fsplit-stack}
standard_testfile
set opts "additional_flags=-fsplit-stack"
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile \
[list $opts]] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "marker_hit"
gdb_breakpoint "marker_miss"
@@ -15,9 +15,9 @@
standard_testfile msym-lang-main.c msym-lang.c
if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2] \
{c++}]} {
- return -1
+ return
}
gdb_test "info func foo" ".* foo\\(\\).* foo\\(\\).*"
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
standard_testfile
if {[prepare_for_testing "failed to prepare" "${testfile}" "${srcfile}"]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "BREAK"]
gdb_continue_to_breakpoint "BREAK"
@@ -24,18 +24,18 @@ standard_testfile
set testcase "nested-subp1"
if {![support_nested_function_tests]} {
untested "compiler does not support nested functions"
- return -1
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
[standard_output_file "${testcase}"] \
executable \
[list debug "additional_flags=-std=gnu99"]] != "" } {
- return -1
+ return
}
# Run until the variables we are interested in are visible.
@@ -24,11 +24,11 @@ standard_testfile
set testcase "nested-subp2"
if {![support_nested_function_tests]} {
untested "compiler does not support nested functions"
- return -1
+ return
}
set flags {}
lappend flags debug
lappend flags additional_flags=-std=gnu99
@@ -40,11 +40,11 @@ if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \
}
if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
[standard_output_file "${testcase}"] \
executable $flags] != "" } {
- return -1
+ return
}
# Run until the variables we are interested in are visible.
@@ -24,11 +24,11 @@ standard_testfile
set testcase "nested-subp3"
if {![support_nested_function_tests]} {
untested "compiler does not support nested functions"
- return -1
+ return
}
set flags {}
lappend flags debug
lappend flags additional_flags=-std=gnu99
@@ -40,11 +40,11 @@ if { [gdb_can_simple_compile ld-flags {int main () { return 0; }} executable \
}
if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
[standard_output_file "${testcase}"] \
executable $flags] != "" } {
- return -1
+ return
}
# Run until the variables we are interested in are visible.
@@ -23,11 +23,11 @@
standard_testfile
set compile_options "debug"
if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
untested "failed to compile"
- return -1
+ return
}
# Start gdb and create an extra console UI. Start the inferior in the
# DRIVER console (either "main" or "extra"), and then enter a
# synchronous execution command in the extra console. Before PR 20494
@@ -20,11 +20,11 @@
standard_testfile
set compile_options "debug"
if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
untested "failed to compile"
- return -1
+ return
}
# See intro.
proc test_command_line_new_ui_pending_input {} {
@@ -16,11 +16,11 @@
standard_testfile
set compile_options "debug"
if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
untested "failed to compile"
- return -1
+ return
}
# Ensure no output has been sent. Use MESSAGE as test message.
proc ensure_no_output {message} {
@@ -13,15 +13,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $testfile.c]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Make sure we do not see any warnings.
gdb_test_multiple "next" "next over exit" {
-re "$inferior_exited_re normally.\[\r\n\]+$gdb_prompt $" {
@@ -17,15 +17,15 @@
# when fetching elements from an array in the C language.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Load 'global_foo' into a history variable.
gdb_test "p global_foo" "\\{f = 1, array = \\{1, 2, 3, 4, 5\\}\\}"
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
proc noreturn_finish_test { } {
global gdb_prompt
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
proc noreturn_test { } {
global gdb_prompt
@@ -17,11 +17,11 @@
standard_testfile offsets.c
if { [prepare_for_testing "failed to prepare for testing large offsets" \
${testfile} ${srcfile}] } {
- return -1
+ return
}
set test "print &big_struct test"
gdb_test_multiple "print &big_struct" "$test" {
-re "${::valnum_re} = .* (0x\[0-9a-fA-F\]*) .*\[\r\n\]*$gdb_prompt $" {
@@ -20,11 +20,11 @@ standard_testfile opaque0.c opaque1.c
# Some tests require GCC.
set gcc_compiled [is_c_compiler_gcc]
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] debug]} {
- return -1
+ return
}
#
# Test basic opaque structure handling (statically).
# The ordering of the tests is significant. We first try the things that
@@ -35,18 +35,18 @@ load_lib compile-support.exp
load_lib completion-support.exp
standard_testfile .c
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
clean_restart
if { ![readline_is_used] } {
untested "no tab completion support without readline"
- return -1
+ return
}
set tui_supported_p [allow_tui_tests]
# Check the completion result, as returned by the "maintenance show
@@ -16,11 +16,11 @@
require {!target_info exists gdb,nointerrupts}
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
- return -1
+ return
}
# Send a ctrl-c while the target is running and check that the output
# does not cause a pagination prompt.
@@ -17,11 +17,11 @@
# does not trigger pagination.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
- return -1
+ return
}
# Check that we handle a stop event coming from a background execution
# command without getting caught in pagination.
@@ -17,11 +17,11 @@
# execution commands directly from the command line, with "-ex".
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
- return -1
+ return
}
set file_arg $binfile
if {[is_remote host]} {
set file_arg [remote_download host $file_arg]
@@ -16,11 +16,11 @@
# Test that an inferior exit event does not trigger pagination.
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
- return -1
+ return
}
# Test paginating while printing about the inferior having exited.
#
proc test_paginate_inferior_exited {} {
@@ -16,11 +16,11 @@
# Test patching executables and core files, with "set write on".
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Check that we can patch an executable.
with_test_prefix "exec" {
@@ -25,11 +25,11 @@
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarnings}]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -30,11 +30,11 @@ set lib_opts debug
set exec_opts [list debug shlib=$lib_sl]
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
}
clean_restart
gdb_test_multiple "break pendfunc1" "set pending breakpoint" {
@@ -21,11 +21,11 @@
standard_testfile start.c
if {[build_executable $testfile.exp $testfile \
$srcfile {debug nowarnings}] == -1} {
untested "failed to compile"
- return -1
+ return
}
clean_restart
with_test_prefix "observer mode off" {
@@ -18,11 +18,11 @@ standard_testfile .cc
set flags {}
lappend flags debug
lappend flags c++
if {[build_executable "failed to prepare" $testfile $srcfile $flags]} {
- return -1
+ return
}
clean_restart
set auto_c \
@@ -40,19 +40,19 @@ set binfile2_test_msg OBJDIR/${subdir}/${executable2}
# file name of the breakpoint.
set opts [list debug pie]
if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts {additional_flags=-DBIN=1}]] == -1
|| [build_executable ${testfile}.exp $executable2 $srcfile [concat $opts {additional_flags=-DBIN=2}]] == -1} {
- return -1
+ return
}
clean_restart ${executable1}
gdb_test_no_output "set args ${binfile2}" "set args ${binfile2_test_msg}"
if {![runto_main]} {
- return -1
+ return
}
# Do not stop on `main' after re-exec.
delete_breakpoints
@@ -15,17 +15,17 @@
set testname pr10179
set sources "pr10179-a.c pr10179-b.c"
if {[build_executable ${testname}.exp $testname $sources {debug}] == -1} {
- return -1
+ return
}
clean_restart ${testname}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "rbreak foo.*" "Breakpoint ${::decimal}\[^\\n\]*\\nint foo\[12\]\[^\\n\]*\\nBreakpoint ${::decimal}\[^\\n\]*\\nint foo\[12\].*"
delete_breakpoints
@@ -29,19 +29,19 @@ set testfile "prelink"
set libsrcfile ${testfile}-lib.c
set libfile [standard_output_file ${testfile}.so]
if {[build_executable "build library" ${libfile} ${libsrcfile} \
{debug shlib}] == -1} {
- return -1
+ return
}
set srcfile ${testfile}.c
set executable ${testfile}t
set binfile [standard_output_file ${executable}]
set prelink_args [build_executable_own_libs ${testfile}.exp $executable $srcfile [list debug "ldflags=-Wl,${libfile},-rpath,[file dirname ${libfile}]"]]
if {$prelink_args == ""} {
- return -1
+ return
}
set test "split debug of executable"
if {[gdb_gnu_strip_debug $binfile]} {
fail $test
@@ -49,11 +49,11 @@ if {[gdb_gnu_strip_debug $binfile]} {
pass $test
}
if {![prelink_yes $prelink_args]} {
# Maybe we don't have prelink.
- return -1
+ return
}
set found 0
set coredir "[standard_output_file coredir.[getpid]]"
file mkdir $coredir
@@ -84,11 +84,11 @@ if { $found == 0 } {
return 0
}
# Relink $libfile to a different address.
if {![prelink_yes $prelink_args]} {
- return -1
+ return
}
# Start with a fresh gdb
clean_restart $executable
@@ -37,11 +37,11 @@
standard_testfile .c
require allow_python_tests
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -17,15 +17,15 @@
standard_testfile
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
untested $testfile.exp
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "print nums" \
"= \\{\\{11, 12, 13\\}, \\{21, 22, 23\\}\\}"
@@ -17,15 +17,15 @@
standard_testfile
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
untested $testfile.exp
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set print pretty on"
gdb_test "print s1" \
@@ -18,11 +18,11 @@
# the thing that is read back is correctly interpreted as a string.
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -25,27 +25,27 @@ set gcorefile ${binfile}.gcore
set objfile [standard_output_file ${testfile}.o]
if { [gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
|| [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
set opts [list debug shlib=${binfile_lib}]
if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
gdb_load_shlib ${binfile_lib}
if {![runto lib]} {
- return -1
+ return
}
if {![gdb_gcore_cmd $gcorefile "save a corefile"]} {
- return -1
+ return
}
proc test_load_core { print_symbol_loading } {
global binfile binfile_lib gcorefile srcdir subdir
with_test_prefix "core ${print_symbol_loading}" {
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test {printf "%ls\n", wide_str} "^wide string"
# Check that if the max-value-size will kick in when using printf on strings.
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
- return -1
+ return
}
set bp_main [gdb_get_line_number "break main" ${testfile}.h]
gdb_test "break -q main" \
@@ -14,21 +14,21 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
standard_testfile .c psym-external-decl-2.c
if { [test_compiler_info "clang-*"] } {
- return -1
+ return
}
set srcfiles [list $srcfile $srcfile2]
if { [build_executable_from_specs \
"failed to prepare" \
$testfile [list] \
$srcfile [list debug] \
$srcfile2 [list]] == -1 } {
- return -1
+ return
}
clean_restart $testfile
gdb_test "print aaa" " = 33"
@@ -28,11 +28,11 @@ require allow_cplus_tests
standard_testfile psymtab1.c psymtab2.c
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] debug]} {
- return -1
+ return
}
# Disable the prompt for whether to set pending breakpoints.
# We don't want a breakpoint, we just want to verify the symbol
# isn't found.
@@ -28,11 +28,11 @@ if { ![is_lp64_target] } {
untested "test work only on lp64 targets"
return 0
}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
# Tests handling flexible array member. Regression tests for PR gdb/33966.
set l {
"ptype /o struct flexible_array_member"
@@ -27,11 +27,11 @@ if { ![is_lp64_target] } {
return 0
}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
{ debug c++ }] } {
- return -1
+ return
}
# Test general offset printing, ctor/dtor printing, union, formatting.
gdb_test "ptype /o struct abc" \
[string_to_regexp [multi_line \
@@ -21,11 +21,11 @@
standard_testfile .c ptype1.c
if {[prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
# Some tests require GCC.
set gcc_compiled [is_c_compiler_gcc]
@@ -78,20 +78,20 @@ gdb_test "ptype struct t_struct" \
# Test the equivalence between '.' and '->' for struct member references.
if {[gdb_test "ptype v_struct1.v_float_member" "type = float"] < 0} {
- return -1
+ return
}
if {[gdb_test "ptype v_struct1->v_float_member" "type = float"] < 0} {
- return -1
+ return
}
if {[gdb_test "ptype v_t_struct_p.v_float_member" "type = float"] < 0} {
- return -1
+ return
}
if {[gdb_test "ptype v_t_struct_p->v_float_member" "type = float"] < 0} {
- return -1
+ return
}
# IBM's xlc puts out bogus stabs--the stuff field is type 42,
# which isn't defined.
@@ -19,11 +19,11 @@ require {!target_info exists gdb,nosignals}
require {!target_info exists gdb,nointerrupts}
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Set a software watchpoint, continue, wait a bit and stop the target
# with ctrl-c. A software watchpoint forces the target to
# single-step.
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
proc address_get { testname } {
global gdb_prompt
@@ -60,11 +60,11 @@ gdb_test "show disable-randomization" \
set addr1 [address_get "randomized first address"]
set addr2 [address_get "randomized second address"]
set test "randomized addresses should not match"
if {[string equal $addr1 $addr2]} {
untested "no randomization detected on this system"
- return -1
+ return
} else {
pass $test
}
gdb_test_no_output "set disable-randomization on"
@@ -17,20 +17,20 @@ load_lib "range-stepping-support.exp"
standard_testfile
set executable $testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
if {![gdb_range_stepping_enabled]} {
unsupported "range stepping not supported by the target"
- return -1
+ return
}
# Check that range stepping can step a range of multiple instructions.
with_test_prefix "multi insns" {
@@ -18,22 +18,22 @@ require {!is_remote host}
standard_testfile .c
set inputrc ${srcdir}/${subdir}/${testfile}.inputrc
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
setenv TERM dumb
# INPUTRC gets reset for the next testfile.
setenv INPUTRC $inputrc
clean_restart $testfile
if { ![readline_is_used] } {
unsupported "completion doesn't work when readline isn't used."
- return -1
+ return
}
gdb_test_no_output "set width 50"
gdb_test_no_output "set height 3"
@@ -21,20 +21,20 @@
# lines in the output.
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
# The fix for this issue relies on GDB being able to adjust the EOF
# flag state within readline. Access to this state was added for
# readline 8.2, but was also backported to out internal readline. If
# this feature is not available then this test might not pass.
if { ![readline_supports_eof_flag] } {
unsupported "readline is not eof flag aware"
- return -1
+ return
}
# Create a breakpoint then issue the 'commands' commands. When the
# secondary prompt is displayed, use Ctrl+d to send EOF to readline
# and cancel the input.
@@ -19,11 +19,11 @@ require !readnow
standard_testfile .c
if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } {
untested "couldn't compile ${srcfile}"
- return -1
+ return
}
save_vars { GDBFLAGS } {
append GDBFLAGS " --readnever"
if { [clean_restart $testfile] == -1 } {
@@ -24,17 +24,17 @@ set srcfilelink [standard_output_file realname-expand-link.c]
remote_exec build "ln -sf ${srcdirabs}/${subdir}/${srcfile2} $srcfilelink"
if { [file type $srcfilelink] != "link" } {
unsupported "target directory cannot have symbolic links"
- return -1
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcfilelink}" "${binfile}" \
executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart ${testfile}
gdb_test_no_output "set basenames-may-differ on"
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break $srcfile:[gdb_get_line_number BREAK $srcfile] if n == 3" \
"Breakpoint $decimal at $hex: file .*recpar\\.c, line $decimal\\."
@@ -24,11 +24,11 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
proc recurse_tests {} {
# Disable hardware watchpoints if necessary.
@@ -18,11 +18,11 @@
# Test listing reggroups and the registers in each group.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -24,11 +24,11 @@
#
# test running programs
#
if { [prepare_for_testing "failed to prepare" relational int-type.c {debug nowarnings}] } {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -23,11 +23,11 @@ if {[target_info gdb_protocol] != "remote"
standard_testfile .c
set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}]
if {$result != ""} {
untested "failed to compile"
- return -1
+ return
}
gdb_start
# Make sure we're disconnected, in case we're testing with an
@@ -39,11 +39,11 @@ proc generate_cmd_file {gdbfile binfile} {
}
require !use_gdb_stub
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Using the source command to read commands from a file is important,
# otherwise section data is freed and reallocated using the same
# memory locations and the bug is not exposed.
@@ -23,11 +23,11 @@
standard_testfile
set executable $testfile
if { [prepare_for_testing "failed to prepare" $executable $srcfile] } {
- return -1
+ return
}
proc restore_tests { } {
global gdb_prompt
@@ -96,9 +96,9 @@ restore_tests
set timeout $prev_timeout
# Test PR cli/23785
clean_restart $testfile
if { ![runto_main] } {
- return -1
+ return
}
gdb_test "restore non-existent-file binary" \
"Failed to open non-existent-file: .*"
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if { ![runto bar] } {
- return -1
+ return
}
with_test_prefix "in bar" {
gdb_test "return" \
[string_to_regexp "Can not force return from an inlined function."]
@@ -16,11 +16,11 @@
# This file was written by Jeff Law. (law@cs.utah.edu)
set allow_float_test [allow_float_test]
if { [prepare_for_testing "failed to prepare" "return"] } {
- return -1
+ return
}
proc return_tests { } {
global gdb_prompt allow_float_test
@@ -25,15 +25,15 @@ set additional_flags ""
if {[have_fvar_tracking]} {
set additional_flags "additional_flags= -fvar-tracking"
}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile [list debug $additional_flags]]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set pattern ".* = \\{int_array = \\{1, 2, 3, 4, 5\\}, double_array = \\{3.25, 5, 6.25, 1.325, -1.95\\}, char_array = \"abcde\"\\}"
gdb_test "p return_large_struct ()" $pattern
@@ -91,11 +91,11 @@ if { ![gdb_can_simple_compile static-pie-static-libc \
void _start (void) { _exit (0); }
} \
executable $rtld_flags] } {
set reason "-static-pie not supported or static libc missing"
untested "failed to compile ($reason)"
- return -1
+ return
}
# Main program file names and flags:
set main_basename ${::gdb_test_file_name}-main
set srcfile_main ${srcdir}/${subdir}/${main_basename}.c
@@ -106,17 +106,17 @@ lappend main_flags \
additional_flags=[quote_for_host -Wl,--dynamic-linker=$binfile_rtld]
# Compile pretend RTLD:
if { [gdb_compile ${srcfile_rtld} ${binfile_rtld} executable $rtld_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Compile main program:
if { [gdb_compile ${srcfile_main} ${binfile_main} executable $main_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
gdb_load $binfile_main
@@ -20,11 +20,11 @@ require can_spawn_for_attach
standard_testfile
set executable $testfile
if {[prepare_for_testing "failed to prepare" $executable]} {
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
set test_pid [spawn_id_get_pid $test_spawn_id]
@@ -18,11 +18,11 @@
require target_can_use_run_cmd
standard_testfile
if {[build_executable "failed to build" $testfile $srcfile {debug}]} {
- return -1
+ return
}
proc test_run {testname} {
gdb_test_multiple "run" $testname {
-re -wrap "During startup program exited with code 126\\." {
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
# the "runto_main" breakpoint above does not interfere with our testing.
delete_breakpoints
@@ -60,11 +60,11 @@ remote_file host delete "$bps"
gdb_test "save breakpoint $bps" "" "save breakpoint bps"
# Now start a new debugger session...
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
# Delete all breakpoints, watchpoints, tracepoints, and catchpoints so that
# the "runto_main" breakpoint above does not interfere with our testing.
delete_breakpoints
@@ -18,17 +18,17 @@
# successfully after several attempts to insert a hardware watchpoint.
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
gdb_test_no_output "set can-use-hw-watchpoints 0"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_multiple "maint info break" "maint info break before" {
-re -wrap "watchpoint.*" {
fail $gdb_test_name
@@ -18,11 +18,11 @@
standard_testfile scope0.c scope1.c
if {[build_executable "failed to build" ${testfile} \
[list $srcfile $srcfile2] {debug}]} {
- return -1
+ return
}
# 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.
@@ -15,11 +15,11 @@
# Test the 'section NAME ADDRESS' command.
if { [prepare_for_testing "failed to prepare" "sect-cmd" \
{break.c break1.c} {debug nowarnings}] } {
- return -1
+ return
}
set srcfile break.c
set srcfile1 break1.c
if {![runto_main]} {
@@ -31,11 +31,11 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Note: the procedure gdb_gnu_strip_debug will produce an executable called
# ${binfile}, which is just like the executable ($binfile) but without
# the debuginfo. Instead $binfile has a .gnu_debuglink section which contains
@@ -43,11 +43,11 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# gdb.base/ subdirectory.
if {[gdb_gnu_strip_debug $binfile$EXEEXT]} {
# check that you have a recent version of strip and objcopy installed
unsupported "cannot produce separate debug info files"
- return -1
+ return
}
#
# PR gdb/9538. Verify that symlinked executable still finds the separate
# debuginfo.
@@ -20,17 +20,17 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {[gdb_gnu_strip_debug $binfile no-main]} {
# check that you have a recent version of strip and objcopy installed
unsupported "cannot produce separate debug info files"
- return -1
+ return
}
clean_restart $testfile
set command "info sym main"
@@ -19,11 +19,11 @@
# command to demonstrate the behavior.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test "break -q main" \
"Breakpoint.*at.* file .*$srcfile, line .*"
@@ -18,11 +18,11 @@
require !use_gdb_stub
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile debug] } {
- return -1
+ return
}
# Test that tilde expansion works fine.
proc_with_prefix test_tilde_expansion { } {
@@ -16,11 +16,11 @@
standard_testfile
set compile_options "debug"
if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} {
untested "failed to compile"
- return -1
+ return
}
proc test_set_inferior_tty { command } {
clean_restart $::testfile
@@ -15,11 +15,11 @@
standard_testfile start.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Do not run the inferior as the purpose of this testcase is to test
# the behavior of the "set language" command when there is no inferior.
@@ -13,11 +13,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
if { [prepare_for_testing "failed to prepare" "set-noassign" start.c {debug nowarnings}] } {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -22,18 +22,18 @@
load_lib completion-support.exp
standard_testfile .c
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
clean_restart
if { ![readline_is_used] } {
untested "no tab completion support without readline"
- return -1
+ return
}
# Test the show command SHOW_CMD. EXPECTED_RE is the expected output.
# Also verifies that $_gdb_maint_setting_str produces an equivalent output,
# matching it with EXPECTED_RE. EXPECTED_RE double quotes are escaped
@@ -25,11 +25,11 @@
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
#
# set it up at a breakpoint so we canplay with the variable values
#
@@ -19,11 +19,11 @@
require !use_gdb_stub
standard_testfile
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
- return -1
+ return
}
set test_var_name "GDB_TEST_VAR"
# Helper function that performs a check on the output of "getenv".
@@ -28,23 +28,23 @@
standard_testfile .c share-psymtabs-bt-2.c
if { [prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
{debug}] } {
untested "failed to compile"
- return -1
+ return
}
# Load $binfile a second time. The second created objfile will re-use the
# partial symtabs created by the first one.
if { [gdb_file_cmd $binfile] != 0 } {
fail "file command failed"
- return -1
+ return
}
gdb_breakpoint "bar"
if { ![runto "bar"] } {
- return -1
+ return
}
# A buggy GDB would fail to find the full symbol associated to this frame's
# address, so would just show "foo ()" (from the minimal symbol).
gdb_test "bt" "foo \\(x=12345\\).*"
@@ -16,11 +16,11 @@
require {!target_info exists gdb,nosignals}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
proc test_one_sig {nextsig} {
global sig_supported
global gdb_prompt
@@ -32,11 +32,11 @@ require {!target_info exists gdb,nosignals}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
#
# Run to `main' where we begin our tests.
#
@@ -23,11 +23,11 @@
require {!target_info exists gdb,nosignals}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test "display/i \$pc"
# Advance to main
@@ -16,15 +16,15 @@
require {!target_info exists gdb,nosignals}
standard_testfile .c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "pass"
gdb_breakpoint "fail"
@@ -27,11 +27,11 @@ require supports_get_siginfo_type
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Advance to main
if {![runto_main]} {
return 0
@@ -27,11 +27,11 @@ require {!target_info exists gdb,nosignals}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test "display/i \$pc"
# Advance to main
@@ -45,17 +45,17 @@ remote_file target delete $gdb_txt
remote_file target delete $standalone_txt
set options [list debug "additional_flags=-DOUTPUT_TXT=\"$gdb_txt\""]
if {[build_executable $testfile.exp $testfile $srcfile $options]} {
untested "failed to compile"
- return -1
+ return
}
set options [list debug "additional_flags=-DOUTPUT_TXT=\"$standalone_txt\""]
if {[build_executable $testfile.exp $testfile-standalone $srcfile $options]} {
untested "failed to compile"
- return -1
+ return
}
# Run the program directly, and dump its initial signal actions and
# mask in "standalone.txt".
@@ -98,19 +98,19 @@ remote_close target
# and mask in "gdb.txt".
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_continue_to_end "collect signals state under gdb"
set test "signals states are identical"
if { ! $have_standalone } {
untested $test
- return -1
+ return
}
if {!$purely_local} {
# Copy file from target to host through build.
remote_download host [remote_upload target gdb.txt] gdb.txt
@@ -18,11 +18,11 @@ require {!target_info exists gdb,nosignals}
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
gdb_exit
gdb_start
@@ -21,26 +21,26 @@ standard_testfile .c -lib.c
set srcdso [file join $srcdir $subdir $srcfile2]
set libname "lib${gdb_test_file_name}.so"
set objdso [standard_output_file $libname]
if {[gdb_compile_shlib $srcdso $objdso {debug}] != ""} {
untested "failed to compile dso"
- return -1
+ return
}
# Build the test executable and runto main.
set opts [list debug shlib=$objdso]
if { [prepare_for_testing "failed to " $testfile $srcfile $opts] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
if {[readnow]} {
untested "this test checks for delayed symtab expansion"
- return -1
+ return
}
# Use 'info sources' to check if the debug information for the shared
# library has been fully expanded or not. Return true if the debug
# information has NOT been fully expanded (which is what we want for this
@@ -18,26 +18,26 @@
standard_testfile
require {!target_info exists gdb,nosignals}
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# If we can examine what's at memory address 0, it is possible that we
# could also execute it. This could probably make us run away,
# executing random code, which could have all sorts of ill effects,
# especially on targets without an MMU. Don't run the tests in that
# case.
if { [is_address_zero_readable] } {
untested "memory at address 0 is possibly executable"
- return -1
+ return
}
# Run until we hit the SIGSEGV (or SIGBUS on some platforms).
gdb_test "continue" \
".*Program received signal (SIGBUS|SIGSEGV).*bowler.*" \
@@ -26,11 +26,11 @@ require {!target_info exists gdb,nosignals}
standard_testfile
if {[build_executable $testfile.exp $testfile $srcfile debug]} {
untested "failed to compile"
- return -1
+ return
}
set clear_done [gdb_get_line_number {done = 0}]
set infinite_loop [gdb_get_line_number {while (!done)}]
set other_handler_location [gdb_get_line_number "other handler location"]
@@ -20,11 +20,11 @@
#
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -18,11 +18,11 @@ standard_testfile
set epilogue [have_epilogue_line_info]
if { [prepare_for_testing "failed to prepare" "skip-inline" \
{skip-inline.c skip1.c } \
{debug nowarnings}] } {
- return -1
+ return
}
set srcfile skip-inline.c
set srcfile1 skip1.c
@@ -39,22 +39,22 @@ set binfile_lib [standard_output_file ${libname}.so]
# the main program.
#
if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} \
[list debug]] != ""} {
- return -1
+ return
}
if {[gdb_compile "${srcdir}/${subdir}/${srcfile_main}" "${binfile_main}.o" \
object debug] != ""} {
- return -1
+ return
}
set testobjdir [standard_output_file {}]
if {[gdb_compile "${binfile_main}.o" "${binfile_main}" executable \
[list debug shlib=$binfile_lib]] != ""} {
- return -1
+ return
}
#
# Test ignoring of a file inside a solib.
#
@@ -21,11 +21,11 @@ load_lib completion-support.exp
standard_testfile
if { [prepare_for_testing "failed to prepare" "skip" \
{skip.c skip1.c } \
{debug nowarnings}] } {
- return -1
+ return
}
set srcfile skip.c
set srcfile1 skip1.c
@@ -18,11 +18,11 @@ standard_testfile .cc
set flags {}
lappend flags debug
lappend flags c++
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -21,11 +21,11 @@ require {!is_remote target}
set testfile "solib-corrupted"
set srcfile start.c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# With probes interface GDB no longer scans the inferior library list so its
# corruption cannot be tested. Disable the probes interface.
gdb_test "maint ignore-probes rtld"
@@ -40,11 +40,11 @@ if { [build_executable "build library" ${binlibfile} ${srclibfile} \
{debug shlib}] == -1
|| [gdb_gnu_strip_debug $binlibfile]
|| [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != ""
|| [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $executable
gdb_load_shlib ${binlibfile}
@@ -19,11 +19,11 @@
# would deference a dangling solib event probe pointer.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {$use_gdb_stub && [target_info exists gdb,do_reload_on_run]} {
# This is the path taken by gdbserver "target remote" boards.
if { [gdb_reload] != 0 } {
@@ -63,20 +63,20 @@ remote_exec build "mkdir [standard_output_file ${right_lib_subdir}]"
if { [gdb_compile_shlib ${srcfile1_lib} ${wrong_binfile1_lib} $wrong_lib_flags] != ""
|| [gdb_compile_shlib ${srcfile2_lib} ${wrong_binfile2_lib} $wrong_lib_flags] != ""
|| [gdb_compile_shlib ${srcfile1_lib} ${right_binfile1_lib} $right_lib_flags] != ""
|| [gdb_compile_shlib ${srcfile2_lib} ${right_binfile2_lib} $right_lib_flags] != "" } {
untested "failed to compile shared library"
- return -1
+ return
}
# Build the test binary using the right copies of the libraries.
remote_exec build "ln -sf ${right_lib_subdir}/${libname1}.so ${binfile1_lib}"
remote_exec build "ln -sf ${right_lib_subdir}/${libname2}.so ${binfile2_lib}"
if { [gdb_compile $srcdir/$subdir/${srcfile} ${binfile} \
executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
if { ![runto_main] } {
@@ -68,11 +68,11 @@ set binfile_lib1 [standard_output_file ${lib1name}.so]
set lib1_flags [list debug shlib=${binfile_lib2}]
if { [gdb_compile_shlib ${srcfile_lib2} ${binfile_lib2} $lib2_flags] != ""
|| [gdb_compile_shlib ${srcfile_lib1} ${binfile_lib1} $lib1_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
# Main program
set testfile "solib-vanish-main"
set srcfile ${srcdir}/${subdir}/${testfile}.c
@@ -86,11 +86,11 @@ if {[is_remote target]} {
lappend cleanfiles_target $binfile_lib1_target.renamed
}
if { [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart $testfile
gdb_locate_shlib $binfile_lib1
@@ -18,11 +18,11 @@
# Test sourcing a script that runs execution commands.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -16,11 +16,11 @@
# Test the 'set source open on|off' command.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test "show source open" "Source opening is \"on\"\\." \
"source opening is initially on"
gdb_test_no_output "set listsize 1"
@@ -36,11 +36,11 @@
require !gdb_debug_enabled
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -19,11 +19,11 @@
standard_testfile
set executable ${testfile}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -40,11 +40,11 @@ gdb_test_multiple $test $test {
pass $test
}
}
if { $next_insn_addr == "" } {
- return -1
+ return
}
gdb_test "b *$next_insn_addr" "Breakpoint .*" "set breakpoint on address"
# So that GDB doesn't try to remove the regular breakpoint when the
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "test-next"] temporary
gdb_continue_to_breakpoint "test-next" ".* test-next .*"
gdb_breakpoint [gdb_get_line_number "test-fail"]
@@ -20,11 +20,11 @@ standard_testfile .cc
set flags {}
lappend flags debug
lappend flags c++
if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
- return -1
+ return
}
# This is a testcase specifically for the `start' GDB command. For regular
# stop-in-main goal in the testcases consider using `runto_main' instead.
@@ -33,11 +33,11 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
# location, even if we have a function named "main" in a non-root namespace.
# For C++ programs, "start" should stop in main().
if { [gdb_start_cmd] < 0 } {
fail start
- return -1
+ return
}
gdb_test "" \
"Temporary breakpoint $decimal at $hex: file.*main \\(\\) at .*start-cpp.cc:.*" \
"start"
@@ -16,20 +16,20 @@
require !use_gdb_stub
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# This is a testcase specifically for the `start' GDB command. For regular
# stop-in-main goal in the testcases consider using `runto_main' instead.
# For C programs, "start" should stop in main().
if { [gdb_start_cmd] < 0 } {
fail start
- return -1
+ return
}
gdb_test "" \
"main \\(\\) at .*start.c.*" \
"start"
@@ -15,11 +15,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Define a stop hook that outputs the value of 'x'
gdb_test_multiple "define hook-stop" "hook-stop" {
@@ -28,11 +28,11 @@ gdb_test_multiple "define hook-stop" "hook-stop" {
}
}
if { [gdb_starti_cmd] < 0 } {
untested starti
- return -1
+ return
}
# The program should stop at the first instruction, so the constructor
# should not have run yet and 'x' should be 0.
@@ -25,11 +25,11 @@ require {!is_remote target}
require {expr {[have_startup_shell] != -1}}
standard_testfile
if { [build_executable "failed to prepare" $testfile $srcfile debug] } {
- return -1
+ return
}
set unique_file [standard_output_file "unique-file.unique-extension"]
set unique_file_dir [standard_output_file ""]
@@ -18,11 +18,11 @@
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
gdb_test "break *hello" \
"Breakpoint.*at.* file .*$srcfile, line .*" \
"breakpoint at first instruction of hello()"
@@ -22,15 +22,15 @@ set cflags "-mindirect-branch=thunk -mfunction-return=thunk"
if { [gcc_major_version] >= 8 } {
append cflags " -fcf-protection=none"
}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
[list debug "additional_flags=$cflags"]] } {
- return -1
+ return
}
if { ![runto_main] } {
- return -1
+ return
}
# Do repeated instruction steps in order to reach TARGET from CURRENT
#
# CURRENT is a string matching the current location
@@ -21,15 +21,15 @@ set flags {}
lappend flags debug
lappend_include_file flags $srcdir/$subdir/$srcfile2
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
$flags] == -1 } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test step $srcfile:$decimal\r\n.*
# Regression test for PR32011.
@@ -22,11 +22,11 @@
standard_testfile
set linefile ${testfile}.inp
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -29,19 +29,19 @@ if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
set syscall_insn "\[ \t\](int|syscall|sysenter)\[ \t\]*"
} elseif { [istarget "aarch64*-*-linux*"] || [istarget "arm*-*-linux*"] } {
set syscall_insn "\[ \t\](swi|svc)\[ \t\]"
} else {
unsupported "unknown syscall instruction"
- return -1
+ return
}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "set follow-fork-mode child"
gdb_test "set detach-on-fork off"
@@ -17,11 +17,11 @@
# symbols for the main binary. PR gdb/13858.
standard_testfile start.c
if { [build_executable "failed to build" ${testfile} $srcfile] } {
- return -1
+ return
}
# Get the current PC. MSG is used as test message.
proc get_pc { msg } {
@@ -36,11 +36,11 @@ if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
}
array set syscall_number {fork "(120|220)" vfork "(190|220)" \
clone "(120|220)"}
} else {
- return -1
+ return
}
proc_with_prefix check_pc_after_cross_syscall { displaced syscall syscall_insn_next_addr } {
set syscall_insn_next_addr_found [get_hexadecimal_valueof "\$pc" "0"]
@@ -357,11 +357,11 @@ step_over_syscall "vfork"
step_over_syscall "clone"
set testfile "step-over-fork"
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
set cond_bp_target 1
set test "set breakpoint condition-evaluation target"
@@ -14,23 +14,23 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "step" " in-func .*"
gdb_test "up" " call-func .*"
gdb_test_no_output {set $b=$pc}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint {*$b if cond ()}
set test {print $bpnum}
@@ -20,11 +20,11 @@
# this in non-stop mode, and adjust the PC incorrectly. PR gdb/12623.
standard_testfile
if {[build_executable "failed to build" ${testfile} ${srcfile} {debug}]} {
- return -1
+ return
}
set linenum_for_user_bp [gdb_get_line_number "break for user-bp test here"]
set linenum_for_step_resume [gdb_get_line_number "break for step-resume test here"]
@@ -13,11 +13,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {nodebug}] == -1} {
- return -1
+ return
}
# We need those symbols global to access them from the .S file.
set test "strip stub symbols"
set objcopy_program [gdb_find_objcopy]
@@ -31,11 +31,11 @@ if {$result != 0} {
pass $test
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint symful
gdb_test "step" "Single stepping until exit.*no line number information.*\r\nBreakpoint \[^\r\n\]* in \\.?symful \\(\\)"
@@ -17,11 +17,11 @@
standard_testfile
set executable $testfile
if { [prepare_for_testing "failed to prepare" $executable $srcfile] } {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -16,15 +16,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" "structs3" "" {debug}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set vhn "${::valnum_re}"
# Check the real contents.
@@ -21,11 +21,11 @@ load_lib gdb-python.exp
standard_testfile
# Compile the test executable.
if {[build_executable "failed to build" $testfile $srcfile {debug macros}]} {
- return -1
+ return
}
# The tests in this file are run multiple times with GDB's styles
# disabled one at a time. This variable is the style that is
# currently disabled.
@@ -18,11 +18,11 @@ standard_testfile symbol-alias.c symbol-alias2.c
# Clang versions prior to v15 do not emit debug info for aliases.
set old_clang [expr {[test_compiler_info {clang-1[0-4]-*-*}] \
|| [test_compiler_info {clang-[1-9]-*}]}]
if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -22,14 +22,14 @@ standard_testfile start.c .c
set binlibfile ${testfile}.x
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" \
[standard_output_file ${binlibfile}] object {debug}] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {[build_executable ${testfile}.exp ${testfile} ${srcfile} {debug}] == -1} {
- return -1
+ return
}
clean_restart ${binlibfile}
gdb_test "add-symbol-file [standard_output_file ${testfile}] 0" \
"Reading symbols from .*" \
@@ -17,11 +17,11 @@ standard_testfile .c
set ofile [standard_output_file ${testfile}.o]
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" \
$ofile object {debug}] != ""} {
untested "failed to compile"
- return -1
+ return
}
clean_restart
gdb_test "add-symbol-file $ofile 0" \
@@ -30,15 +30,15 @@ if {[lindex $status 0] != 0} {
unsupported "$test (host does not support symbolic links)"
return 0
}
if {[prepare_for_testing $testfile $testfile $srcfilelink]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Using a line number ensures that the default symtab is used.
gdb_breakpoint [gdb_get_line_number "break here" $srcfile] message
gdb_continue_to_breakpoint "run to breakpoint marker"
@@ -34,11 +34,11 @@ if { [prepare_for_testing "prepare" $testfile [list $srcfile $srcfile2] \
}
gdb_load_shlib $lib1
if {![runto_main]} {
- return -1
+ return
}
# PR 17564
# Expand something in the shared library,
# and then try to print static_global in the binary.
@@ -15,11 +15,11 @@
# Test that GDB saves and restores terminal settings correctly. Also check
# the output of the "info terminal" command.
if { [prepare_for_testing "failed to prepare" term term.c] } {
- return -1
+ return
}
# Once before running the program.
gdb_test "info terminal" \
"No saved terminal information.*" \
@@ -18,24 +18,24 @@
# displayed correctly.
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
delete_breakpoints
gdb_breakpoint "foo thread 1"
set bp_number [get_integer_valueof "\$bpnum" 0]
if { $bp_number == 0 } {
unresolved "breakpoint not placed correctly"
- return -1
+ return
}
set saw_header false
set saw_cond false
set loc_count 0
@@ -316,33 +316,33 @@ proc do_tests {force_internal_tls} {
}
# Build shared objects for dlopen:
if { [gdb_compile_shlib $libsrc $lib1obj [list debug additional_flags=-DN=1]] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
if { [gdb_compile_shlib $libsrc $lib2obj [list debug additional_flags=-DN=2]] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
if { [gdb_compile_shlib $libsrc $lib3obj [list debug additional_flags=-DN=3]] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
if { [gdb_compile_shlib $libsrc $lib4obj [list debug additional_flags=-DN=4]] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
# Build shared objects to link against main program:
if { [gdb_compile_shlib $libsrc $lib10obj [list debug additional_flags=-DN=10]] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
if { [gdb_compile_shlib $libsrc $lib11obj [list debug additional_flags=-DN=11]] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
# Use gdb_compile_pthreads to build and link the main program for
# testing. It's also possible to run the tests using plain old
# gdb_compile, but this adds complexity with setting up additional
@@ -165,19 +165,19 @@ proc do_tests {force_internal_tls {do_kfail_tls_access 0}} {
}
}
if { [gdb_compile_shlib $lib1src $lib1obj {debug}] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
if { [gdb_compile_shlib $lib2src $lib2obj {debug}] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
if { [gdb_compile_shlib $lib3src $lib3obj {debug}] != "" } {
untested "failed to compile shared object"
- return -1
+ return
}
# Certain linux target architectures implement support for internal
# TLS lookup which is used when thread stratum support (via
# libthread_db) is missing or when the linux-only GDB maintenance
@@ -20,11 +20,11 @@ require {istarget *-linux*}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug pthreads}]} {
- return -1
+ return
}
if {![runto "parent_stop"]} {
return -1
}
@@ -15,15 +15,15 @@
# Do not run if gdb debug is enabled as it will interfere with log redirect.
require !gdb_debug_enabled
if { [prepare_for_testing "failed to prepare" ui-redirect start.c] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set test "commands"
gdb_test_multiple $test $test {
-re "End with a line saying just \"end\"\\.\r\n>$" {
@@ -17,11 +17,11 @@
# until when there is no debug information.
standard_testfile advance.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile nodebug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -82,11 +82,11 @@ load_lib dwarf.exp
require dwarf2_support
standard_testfile .c .S
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
global srcdir subdir srcfile
@@ -155,15 +155,15 @@ Dwarf::assemble $asm_file {
}
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile $asm_file] {nodebug} ] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "next" ".* TAG: loop code .*" "inside the loop"
gdb_test "next" ".* TAG: loop line .*" "ending of loop"
gdb_test "until" ".* TAG: main return .*" "left loop"
@@ -15,11 +15,11 @@
# until.exp -- Expect script to test 'until' in gdb
set srcfile break.c
if { [prepare_for_testing "failed to prepare" "until" {break.c break1.c} {debug nowarnings}] } {
- return -1
+ return
}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location19 [gdb_get_line_number "set breakpoint 19 here"]
set bp_location20 [gdb_get_line_number "set breakpoint 20 here"]
@@ -24,11 +24,11 @@
# value, can be calculated correctly.
if {[prepare_for_testing_full "failed to prepare" \
[list ${testfile} $ldflags \
$srcfile $srcfile_flags $srcfile2 $srcfile2_flags]]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -21,11 +21,11 @@ require {!target_info exists gdb,nosignals}
require {!target_info exists gdb,cannot_call_functions}
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if { ![runto_main] } {
return 0
}
@@ -31,11 +31,11 @@ standard_testfile
# Enable basic use of UTF-8. LC_ALL gets reset for each testfile.
setenv LC_ALL C.UTF-8
if { [prepare_for_testing "failed to prepare" ${testfile} [list $srcfile]] } {
- return -1
+ return
}
if {![runto done]} {
return
}
@@ -64,11 +64,11 @@ gdb_test_no_output "nosharedlibrary"
# Tests below are about tab-completion, which doesn't work if readline
# library isn't used. Check it first.
if { ![readline_is_used] } {
untested "no tab completion support without readline"
- return -1
+ return
}
# Test linespec completion.
# A unique completion.
@@ -20,15 +20,15 @@ load_lib valgrind.exp
require {!is_remote target}
standard_testfile .c
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
if { [vgdb_start] == -1 } {
- return -1
+ return
}
set double_free [gdb_get_line_number "double-free"]
gdb_breakpoint "main"
@@ -25,15 +25,15 @@ load_lib valgrind.exp
require {!is_remote target}
standard_testfile .c
if {[build_executable "failed to build" $testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
if { [vgdb_start] == -1 } {
- return -1
+ return
}
gdb_test_no_output "set displaced-stepping off"
gdb_breakpoint "main" "breakpoint at main"
gdb_test "continue" " stop 0 .*" "continue to main"
@@ -36,16 +36,16 @@ load_lib valgrind.exp
require {!is_remote target}
standard_testfile .c
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
set active_at_startup 0
if { [vgdb_start $active_at_startup] == -1 } {
- return -1
+ return
}
# Determine whether we're at nanosleep.
gdb_test_multiple "bt 1" "do printf" {
-re -wrap "nanosleep.*" {
@@ -20,15 +20,15 @@ load_lib valgrind.exp
require {!is_remote target}
standard_testfile .c
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
- return -1
+ return
}
if { [vgdb_start] == -1 } {
- return -1
+ return
}
set continue_count 1
set loop 1
while {$loop && $continue_count < 100} {
@@ -22,15 +22,15 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
# Disable hardware watchpoints if necessary.
if {!$allow_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
@@ -16,11 +16,11 @@
# Test GDB's value availability ranges.
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -18,11 +18,11 @@
# warning: Could not load shared library symbols for linux-vdso.so.1.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
with_test_prefix "setup" {
gdb_breakpoint "main"
@@ -27,11 +27,11 @@ set binfile ${testfile}-exit
set binfile2 ${testfile}-exec
set binfile3 vforked-prog
if { [build_executable "compile $binfile3" $binfile3 $srcfile2] } {
untested "failed to compile third test binary"
- return -1
+ return
}
if { [is_remote target] } {
gdb_remote_download target [standard_output_file $binfile3]
}
@@ -14,15 +14,15 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "vlas_filled"]
gdb_continue_to_breakpoint "vlas_filled"
@@ -15,15 +15,15 @@
standard_testfile
set using_clang [test_compiler_info clang*]
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
set sizeof_int [get_sizeof "int" 4]
# Check that VLA passed to function (pointer) points to the first element.
@@ -17,15 +17,15 @@
# Based on gcc/testsuite/gcc.dg/vla-4.c; vla-15.c
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "vla-filled"]
gdb_continue_to_breakpoint "vla-filled"
@@ -17,15 +17,15 @@ standard_testfile
# Clang says it will never support variable length arrays in structures.
require {!test_compiler_info clang*}
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "vlas_filled"]
gdb_continue_to_breakpoint "vlas_filled"
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c vla-stub-define.c
if { [prepare_for_testing "failed to prepare for vla-stub.exp" \
${testfile} [list ${srcfile} ${srcfile2}]] } {
- return -1
+ return
}
gdb_test "p *local_struct.ptr" { = {dynamic_field = 0x0}}
gdb_test "whatis local_struct.here" "type = static_struct_t"
@@ -34,11 +34,11 @@
#
# Use the same test program constvars.c.
if { [prepare_for_testing "failed to prepare" volatile constvars.c] } {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -25,11 +25,11 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Set a watchpoint watching EXPR.
proc watch { expr } {
global decimal
@@ -28,11 +28,11 @@ standard_testfile
require {!target_info exists gdb,cannot_call_functions}
if { [build_executable ${testfile}.exp ${testfile} ${testfile}.c {debug}] } {
untested "failed to compile"
- return -1
+ return
}
proc test_watchpoint { hw } {
global testfile
@@ -26,11 +26,11 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Disable hardware watchpoints if necessary.
if {!$allow_hw_watchpoint_tests_p} {
gdb_test_no_output "set can-use-hw-watchpoints 0" ""
@@ -18,11 +18,11 @@
#
standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -25,11 +25,11 @@
standard_testfile .c
require allow_hw_watchpoint_access_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -19,11 +19,11 @@ standard_testfile .c
require allow_fork_tests
if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] } {
untested "failed to compile"
- return -1
+ return
}
proc test_watchpoint_across_vfork { hw teststr } {
global testfile
@@ -19,18 +19,18 @@ standard_testfile .c watchpoint-cond-gone-stripped.c
# Stepping into a dynamic function trampoline or stepping out of MAIN may work
# but it is not a reliable FAIL case.
if {[prepare_for_testing_full "failed to prepare" \
[list $testfile debug $srcfile debug $srcfile2 {}]]} {
- return -1
+ return
}
# Problem does not occur otherwise.
gdb_test_no_output "set can-use-hw-watchpoints 0"
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "watchpoint-here"]
gdb_continue_to_breakpoint "Place to set the watchpoint"
@@ -14,18 +14,18 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# It is more compatible this way.
gdb_test_no_output "set can-use-hw-watchpoints 0"
if {![runto_main]} {
- return -1
+ return
}
# Ensure there is a parent frame to create related bp_watchpoint_scope.
gdb_breakpoint [gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "break-here" ".* break-here .*"
@@ -21,11 +21,11 @@ require allow_hw_watchpoint_tests
require can_spawn_for_attach
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
@@ -16,15 +16,15 @@
require allow_hw_watchpoint_access_tests
set test watchpoint-hw-hit-once
set srcfile ${test}.c
if { [prepare_for_testing "failed to prepare" ${test} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "rwatch watchee"
gdb_breakpoint [gdb_get_line_number "dummy = 2"]
@@ -18,11 +18,11 @@ require !use_gdb_stub
require allow_hw_watchpoint_tests
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
# Create the watchpoint before the inferior gets started. Now the native CPU
# target is still not active and its `to_can_use_hw_breakpoint' is not
# installed, therefore only a software watchpoint gets created.
@@ -31,11 +31,11 @@ gdb_test "watch watchee" "atchpoint 1: watchee"
# `runto_main' or `runto main' would delete the watchpoint created above.
if { [gdb_start_cmd] < 0 } {
fail start
- return -1
+ return
}
gdb_test "" "main .* at .*" "start"
# Check it is really a `hw'-watchpoint.
gdb_test "info watchpoints" "1 *hw watchpoint .* watchee"
@@ -33,11 +33,11 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
# starting the test.
standard_testfile
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return 0
}
@@ -21,11 +21,11 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if {[build_executable "failed to prepare" $testfile $srcfile {debug}]} {
- return -1
+ return
}
# STOP_MODE is either "all-stop" or "non-stop". HW is true if we are
# testing hardware watchpoints, and false if we're testing software
# watchpoints.
@@ -72,11 +72,11 @@ standard_testfile
# No use testing this if we can't use hardware watchpoints.
require allow_hw_watchpoint_tests
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -19,15 +19,15 @@
require allow_hw_watchpoint_tests
standard_testfile
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
- return -1
+ return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "start_again"] "Breakpoint $decimal at $hex" "start_again"
set sizes {1 2 4 8}
@@ -27,11 +27,11 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
set wp_set 1
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
with_test_prefix "before inferior start" {
# Ensure that if we turn off hardware watchpoints and set a watch point
# before starting the inferior the watchpoint created will not be a
@@ -14,11 +14,11 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
set bp_location [gdb_get_line_number "START"]
if {![runto "wchar.c:$bp_location"]} {
return -1
@@ -28,11 +28,11 @@
#
# test running programs
#
if { [prepare_for_testing "failed to prepare" whatis-exp int-type.c {debug nowarnings}] } {
- return -1
+ return
}
#
# set it up at a breakpoint so we can play with the variable values
#
@@ -19,16 +19,16 @@
standard_testfile with-mf-main.c with-mf-inc.c
if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
debug]} {
- return -1
+ return
}
if { [ensure_gdb_index $binfile] == -1 } {
untested "error adding gdb index"
- return -1
+ return
}
clean_restart $testfile
gdb_test "with language ada -- print g_s" \
@@ -20,11 +20,11 @@
load_lib completion-support.exp
standard_testfile .c
if {[build_executable "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
clean_restart $testfile
# Test "maint with". VALUES is a list of values. A nested "with" is
@@ -22,11 +22,11 @@ global GDBFLAGS
standard_testfile
if {[build_executable $testfile.exp $testfile \
$srcfile [list debug nowarnings] ] == -1} {
untested $testfile.exp
- return -1
+ return
}
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS $binfile"
clean_restart
@@ -35,18 +35,18 @@ if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \
if {[gdb_compile \
[list ${srcdir}/${subdir}/$main_testfile.c $opaque_objfile] \
[standard_output_file ${main_testfile}] \
executable {debug}] != ""} {
untested "failed to build $main_testfile"
- return -1
+ return
}
clean_restart ${main_testfile}
if {![runto opaque_routine]} {
untested "could not run to opaque_routine"
- return -1
+ return
}
# Make sure that "bt full" command is capable of displaying MY_TABLE
# correctly when frame #0 (the frame which does not have any debugging
# info) is the selected frame.