@@ -40,17 +40,17 @@ with_test_prefix "file symlink" {
remote_file host delete [standard_output_file $filelink]
set status [remote_exec host \
"ln -sf ${testfile} [standard_output_file $filelink]"]
if {[lindex $status 0] != 0} {
unsupported "$test (host does not support symbolic links)"
- return 0
+ return
}
clean_restart "$filelink"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set print repeats 10000"
gdb_test_no_output "set print elements 10000"
@@ -80,17 +80,17 @@ with_test_prefix "dir symlink" {
# delete a directory.
remote_exec host "rm -f [standard_output_file $dirlink]"
set status [remote_exec host "ln -sf . [standard_output_file $dirlink]"]
if {[lindex $status 0] != 0} {
unsupported "$test (host does not support symbolic links)"
- return 0
+ return
}
clean_restart "$dirlink/$filelink"
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set print repeats 10000"
gdb_test_no_output "set print elements 10000"
@@ -21,11 +21,11 @@ require support_displaced_stepping
require !use_gdb_stub
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
}
set gdbindex_warning_re "warning: Skipping \[^\r\n\]+ \\.gdb_index section \[^\r\n\]*\r\nDo \"set use-deprecated-index-sections on\" before the file is read\r\nto use the section anyway\\."
@@ -97,11 +97,11 @@ if {$result == 0} {
with_test_prefix "rebuild with DGEN defined" {
set prelink_args [build_executable_own_libs ${testfile}.exp $executable $srcfile \
[list pie "additional_flags=-DGEN=\"$genfile\""]]
if {$prelink_args == ""} {
- return -1
+ return
}
}
# x86_64 file has 25MB, no need to keep it.
file delete -- $genfile
@@ -37,12 +37,12 @@ if { [istarget "*-*-*bsd*"]
standard_testfile .c
set corefile [standard_output_file ${binfile}.corefile]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Traverse part of bigcore's linked list of memory chunks (forward or
# backward), saving each chunk's address.
@@ -119,11 +119,11 @@ proc do_test {} {
with_test_prefix "run" {
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
do_test
}
@@ -33,11 +33,11 @@ save_vars { GDBFLAGS } {
append GDBFLAGS " --args ${binfile}"
gdb_exit
if {[gdb_spawn] != 0} {
fail "spawn gdb"
- return -1
+ return
}
}
gdb_test_multiple "" "execute bp commands" {
-re " = 123\r\n$gdb_prompt $" {
@@ -26,11 +26,11 @@ if { [build_executable ${testfile}.exp ${testfile} $srcfile {debug}] == -1 } {
with_test_prefix "single-step" {
global testfile
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
set line_num [gdb_get_line_number "loop-line" ${testfile}.c]
gdb_test "break ${testfile}.c:${line_num}" "Breakpoint .*" \
"set breakpoint"
@@ -59,11 +59,11 @@ with_test_prefix "break-cond" {
foreach_with_prefix side {"host" "target"} {
clean_restart ${testfile}
if {![runto_main]} {
- return -1
+ return
}
set test "set breakpoint condition-evaluation $side"
gdb_test_multiple $test $test {
-re "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead.\r\n$gdb_prompt $" {
@@ -76,11 +76,11 @@ foreach test_value {0 1} {
-re "Cannot access memory at address $hex.*$gdb_prompt $" {
# Some targets do not allow manually writing a breakpoint to a
# certain memory address, like QEMU. In that case, just bail out.
unsupported "cannot write to address $bp_address"
- return -1
+ return
}
-re " = .*$gdb_prompt $" {
pass $write_test
}
}
@@ -35,11 +35,11 @@ if {![runto_main]} {
# skip this test.
gdb_test_multiple "maint set internal-error backtrace on" \
"check backtrace is supported" {
-re "support for this feature is not compiled into GDB" {
untested "feature not supported"
- return -1
+ return
}
-re "$gdb_prompt $" {
pass $gdb_test_name
}
}
@@ -40,11 +40,11 @@ if {![runto_main]} {
# trying to turn this on will give an error, in which case we just
# skip this test.
gdb_test_multiple "maint set backtrace-on-fatal-signal on" "" {
-re "support for this feature is not compiled into GDB" {
untested $testfile
- return -1
+ return
}
-re "$gdb_prompt $" {
pass $gdb_test_name
}
}
@@ -42,11 +42,11 @@ foreach kind {"fork" "vfork"} {
set compile_options "debug additional_flags=-DFORK=$kind"
set testfile [set testfile_$kind]
if {[build_executable $testfile.exp $testfile ${srcfile} \
${compile_options}] == -1} {
untested "failed to compile"
- return -1
+ return
}
}
# The test proper. FORK_KIND is either "fork" or "vfork". EXIT_KIND
# is either "exit" (run the parent to exit) or "kill" (kill parent).
@@ -22,11 +22,11 @@
require supports_catch_syscall
standard_testfile
if { [prepare_for_testing "failed to prepare" $testfile ${testfile}.c] } {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -36,11 +36,11 @@ if {[is_remote host]} {
set copy1_txt [standard_output_file copy1.txt]
}
if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
[list debug "additional_flags=-DPI_TXT=\"$pi_txt\" -DCOPY1_TXT=\"$copy1_txt\""]]} {
- return -1
+ return
}
global gdb_prompt
#
@@ -36,16 +36,16 @@ if {[istarget "riscv*-*-*"]} {
remote_exec build "rm -f ${binfile1}"
remote_exec build "rm -f ${binfile2}"
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable $opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $opts] != "" } {
untested "failed to compile"
- return -1
+ return
}
proc not_null_var_address { var } {
# Same as get_var_address, expect that it reports a failure if a null
@@ -115,11 +115,11 @@ with_test_prefix "read-only" {
}
}
if {!$has_ro_sections} {
unsupported "no read-only sections"
- return -1;
+ return
}
set orig -1
set test "get value of read-only section"
@@ -130,11 +130,11 @@ with_test_prefix "read-only" {
}
}
if {$orig == -1} {
untested "couldn't read address of read-only section"
- return -1
+ return
}
# Come up with different value.
set patch [expr {255 - $orig}]
@@ -151,11 +151,11 @@ with_test_prefix "read-only" {
}
}
if { $written != $patch } {
unsupported "can't patch read-only section"
- return -1
+ return
}
gdb_test "compare-sections -r" \
"MIS-MATCHED.*warning.*One or more sections.*does not match.*loaded file.*"
}
@@ -45,11 +45,11 @@ gdb_test_no_output $test_auto
set warning "warning: Target does not support breakpoint condition evaluation.\r\nUsing host evaluation mode instead."
gdb_test_multiple $test_target $test_target {
-re "$warning\r\n$gdb_prompt $" {
unsupported $test_target
- return -1
+ return
}
-re "^$test_target\r\n$gdb_prompt $" {
pass $test_target
}
@@ -65,11 +65,11 @@ with_test_prefix "with run" {
# This is needed to check a scenario where the breakpoints are no
# longer re-inserted due to solib events. Note that runto_main
# deletes the breakpoints.
with_test_prefix "with continue 1" {
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$bp_location"
set bpnum [get_integer_valueof "\$bpnum" 0 "get bpnum"]
@@ -85,11 +85,11 @@ with_test_prefix "with continue 1" {
}
# Repeat with a condition that evaluates to false.
with_test_prefix "with continue 2" {
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$bp_location"
set bpnum [get_integer_valueof "\$bpnum" 0 "get bpnum"]
@@ -105,11 +105,11 @@ with_test_prefix "with continue 2" {
}
# Repeat with a condition that contains junk at the end.
with_test_prefix "with junk" {
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint "$bp_location"
set bpnum [get_integer_valueof "\$bpnum" 0 "get bpnum"]
@@ -19,11 +19,11 @@
standard_testfile
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
}
if {![runto_main]} {
return
@@ -192,11 +192,11 @@ gdb_test_multiple "info inferiors" "getting inferior pid" {
}
-re "Remote target.*$gdb_prompt $" {
# If the target does not provide PID information (like usermode QEMU),
# just bail out as the rest of the test may rely on it, giving spurious
# failures.
- return -1
+ return
}
}
# Get the main function's address.
set main_addr ""
@@ -215,17 +215,17 @@ proc locate_exec_from_core_build_id {corefile buildid \
foreach_with_prefix mode { exec shared } {
# Build the executable.
set progname ${binfile}-$mode
set build_proc build_corefile_buildid_${mode}
if { ![$build_proc $progname] } {
- return -1
+ return
}
# Generate a corefile.
set corefile [create_core_file $progname]
if { $corefile eq "" } {
- return -1
+ return
}
# Get the build-id filename without ".debug" on the end. This
# will have the format: '.build-id/xx/xxxxx'
set buildid [build_id_debug_filename_get $progname ""]
@@ -145,11 +145,11 @@ save_vars { ::env($env_var_name) } {
setenv $env_var_name $env_var_value
set corefile [core_find $binfile {} $args]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
}
set corefile_3 "$binfile.2.core"
remote_exec build "mv $corefile $corefile_3"
@@ -63,11 +63,11 @@ with_test_prefix "absolute path" {
# executable.
with_test_prefix "to file" {
set corefile [core_find $binfile]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
set corefile_1 "$binfile.1.core"
remote_exec build "mv $corefile $corefile_1"
test_load $corefile_1 $binfile $binfile
@@ -84,11 +84,11 @@ with_test_prefix "absolute path" {
}
set corefile [core_find $symlink]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
set corefile_2 "$binfile.2.core"
remote_exec build "mv $corefile $corefile_2"
test_load $corefile_2 $symlink $symlink
@@ -106,11 +106,11 @@ with_test_prefix "absolute path" {
}
set corefile [core_find $symlink]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
set corefile_3 "$binfile.3.core"
remote_exec build "mv $corefile $corefile_3"
remote_exec build "rm -f $symlink"
@@ -140,11 +140,11 @@ with_test_prefix "absolute path" {
remote_exec build "cp $binfile $binfile_2"
set corefile [core_find $binfile_2]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
set corefile_4 "$binfile.4.core"
remote_exec build "mv $corefile $corefile_4"
set side_dir [standard_output_file side_dir]
@@ -214,11 +214,11 @@ with_test_prefix "relative path" {
with_cwd $work_dir {
with_test_prefix "to file" {
set corefile [core_find $rel_path_to_file]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
set corefile_5 "${work_dir}/${testfile}.5.core"
remote_exec build "mv $corefile $corefile_5"
test_load $corefile_5 \
@@ -228,11 +228,11 @@ with_test_prefix "relative path" {
with_test_prefix "to symlink" {
set corefile [core_find $rel_path_to_symlink_2]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
set corefile_6 "${work_dir}/${testfile}.6.core"
remote_exec build "mv $corefile $corefile_6"
test_load $corefile_6 \
@@ -516,11 +516,11 @@ foreach testspec $specs {
}
# These tests don't rely on the debug format.
with_test_prefix nodebug {
if { [prepare_for_testing "failed to prepare" $testfile $srcfile {nodebug}] } {
- return 0
+ return
}
gdb_test "ptype _Atomic int" "type = _Atomic int"
gdb_test "ptype int * restrict" "type = int \\* restrict"
@@ -17,11 +17,11 @@
# NOTE: This test could be much more thorough.
# Only GNU/Linux is known to support this.
if { ! [istarget "*-*-linux*"] } {
- return 0
+ return
}
standard_testfile attach.c
set escapedbinfile [string_to_regexp ${binfile}]
@@ -18,11 +18,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break function" \
"Breakpoint.*at.* file .*$srcfile, line.*" \
"setting breakpoint on function"
@@ -24,12 +24,12 @@ set testfile dmsym_main
set dmsym_o [standard_output_file dmsym.o]
if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \
$dmsym_o \
object {}] != ""} {
- untested "failed to compile object file"
- return -1
+ untested "failed to compile object file"
+ return
}
if {[gdb_compile \
[list ${srcdir}/${subdir}/dmsym_main.c $dmsym_o] \
[standard_output_file ${testfile}] \
@@ -47,18 +47,18 @@ if { [build_executable "build shlib 2" $binfile_libdso2 \
return
}
if { [prepare_for_testing "prepare" $testfile $srcfile \
[list debug shlib=$binfile_libdso2 shlib=$binfile_libdso1]] != 0 } {
- return
+ return
}
gdb_load_shlib $binfile_libdso2
gdb_load_shlib $binfile_libdso1
if { ![runto_main] } {
- return -1
+ return
}
set bp_location [gdb_get_line_number "STOP HERE" [file tail $srcfile_libdso1]]
gdb_breakpoint ${libdso1}.c:${bp_location}
@@ -19,16 +19,16 @@ set test_sso [expr \
{[supports_scalar_storage_order_attribute] \
&& [supports_gnuc]}]
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
[list debug additional_flags=-DTEST_SSO=$test_sso]] } {
- return -1
+ return
}
set bp_location [gdb_get_line_number "START"]
if {![runto "endianity.c:$bp_location"]} {
- return -1
+ return
}
gdb_test "print o" "= {v = 3, w = 2, x = 7, f = 23.5, cplx = 1.25 \\+ 7.25i, d = 75}" \
"print o before assignment"
@@ -45,17 +45,17 @@ set binfile2 [standard_output_file ${testfile2}]
set compile_options debug
# build the first test case
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" executable $compile_options] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_options] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Test exec catchpoints to ensure exec events are supported.
#
proc do_catch_exec_test { } {
@@ -93,11 +93,11 @@ if { [gdb_breakpoint [standard_output_file tmp-${srcfile}]:${line} {no-message}]
# we'll run GDB from.
with_cwd [standard_output_file {}] {
if { [gdb_compile [standard_output_file tmp-${srcfile}] "${testfile}" \
executable {debug}] != "" } {
- return -1
+ return
}
}
clean_restart $testfile
@@ -27,11 +27,11 @@ if { [file pathtype $objdir] != "absolute" } {
with_cwd $srcdir {
set err [gdb_compile "${subdir}/${srcfile} ${subdir}/${srcfile2}" $binfile executable {debug}]
if { $err != "" } {
untested "${srcfile} or ${srcfile2} compilation failed"
- return -1
+ return
}
}
set result [catch {exec realpath ${srcdir}/${subdir}/${srcfile2}} realsrcfile2]
if { $result != 0 || $realsrcfile2 == "" } {
@@ -22,29 +22,29 @@ set binfile_lib [standard_output_file ${libfile}.so]
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
+ untested "failed to compile"
+ return
}
set opts [list debug shlib=${binfile_lib} ldflags=-Wl,-z,relro]
if { [gdb_compile ${objfile} ${binfile} executable $opts] != "" } {
- unsupported "-Wl,-z,relro compilation failed"
- return -1
+ unsupported "-Wl,-z,relro compilation failed"
+ return
}
with_test_prefix "first session" {
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
}
}
# Now restart gdb and load the corefile.
@@ -52,11 +52,11 @@ set pre_corefile_extern_array \
[capture_command_output "print extern_array" "$print_prefix"]
set corefile [standard_output_file gcore.test]
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
# Now restart gdb and load the corefile.
clean_restart $testfile
@@ -24,11 +24,11 @@ require has_gcore_script
require can_spawn_for_attach
set corefile [standard_output_file ${testfile}.core]
if {[build_executable "failed to build" $testfile ${srcfile}] == -1 } {
- return -1
+ return
}
# Cleanup.
proc core_clean {} {
@@ -43,11 +43,11 @@ if { [prepare_for_testing "prepare" $testfile $srcfile \
gdb_load_shlib $binfile_lib1
gdb_load_shlib $binfile_lib2
if { ![runto_main] } {
- return -1
+ return
}
gdb_test "next" "$decimal.*b_main \\(\\);" "step over c_main"
gdb_test "next" "$decimal.*return 0;" "step over b_main"
gdb_test "print test" " = 42"
@@ -391,11 +391,11 @@ with_test_prefix "static" {
if { [gdb_compile ${srcdir}/${subdir}/$libsrc $lib_o object {}] != ""
|| [gdb_compile ${srcdir}/${subdir}/$final_src $final_o object {}] != ""
|| [gdb_compile "${srcdir}/${subdir}/$srcfile $lib_o $final_o" \
$staticbinfile executable {debug}] != "" } {
untested "failed to compile second testcase"
- return -1
+ return
}
clean_restart $staticexecutable
gdb_breakpoint "gnu_ifunc"
@@ -34,12 +34,12 @@ proc do_compile { {opts {}} } {
if { [do_compile {-mcpu=native}] != ""
&& [do_compile {-mcpu=native -Wno-psabi}] != ""
&& [do_compile {-march=native}] != ""
&& [do_compile] != ""} {
- untested "compiler can't handle vector_size attribute?"
- return -1
+ untested "compiler can't handle vector_size attribute?"
+ return
}
clean_restart $testfile
if { ![runto_main] } {
@@ -44,11 +44,11 @@ require {expr {$compilation_succeeded}}
# Start with a fresh gdb.
clean_restart $testfile
with_timeout_factor 3 {
if {![runto_main]} {
- return -1
+ return
}
gdb_test_no_output "set max-value-size unlimited"
gdb_test_no_output "maint set per-command space on"
@@ -36,11 +36,11 @@ foreach_with_prefix n_flag { 0 1 } {
}
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $sep_lib_flags] != ""
|| [gdb_compile $srcdir/$subdir/${srcfile} ${binfile} \
executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {$libsepdebug == "SEP"} {
if {[gdb_gnu_strip_debug $binfile_lib] != 0} {
unsupported "could not split debug of $binfile_lib."
@@ -51,11 +51,11 @@ foreach_with_prefix n_flag { 0 1 } {
}
clean_restart $executable
if {![runto_main]} {
- return 0
+ return
}
set match_str {All functions matching regular expression "foo":[\r\n]*}
if { "$libsepdebug" != "NO" } {
append match_str {File .*/info-fun-solib[.]c:[\r\n]*}
@@ -25,11 +25,11 @@ standard_testfile break.c break1.c
save_vars { env(GDB_INFO_PROC_ENVIRON_1) } {
set env(GDB_INFO_PROC_ENVIRON_1) "ONE"
if {[prepare_for_testing "failed to prepare" $testfile \
[list $srcfile $srcfile2] {debug nowarnings}]} {
- return -1
+ return
}
}
gdb_test "help info proc" "Show additional information about a process.*"
@@ -38,11 +38,11 @@ gdb_test_multiple "info proc" "info proc without a process" {
pass "info proc without a process"
}
-re "Not supported on this target.*$gdb_prompt $" {
# info proc command not supported -- nothing to test here.
unsupported "gdb does not support info proc on this target"
- return -1
+ return
}
}
# Set command line arguments to be verified later with "info proc
# cmdline". However, if we're using a stub, then "set args" would not
@@ -158,11 +158,11 @@ with_test_prefix styled {
clean_restart $testfile
gdb_test_no_output "set style enabled off"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "stop"
gdb_continue_to_breakpoint "library load #1" "\\.?stop .*"
# Simple test for "info sharedlibrary" styling. Look for styled
@@ -80,10 +80,10 @@ gdb_test_multiple "define hello" "$test" {
gdb_test "$commands\nend" "" "finish defining hello command"
gdb_test "hello" [string_to_regexp "^done,value=\"23\""]
if {![runto_main]} {
- return -1
+ return
}
gdb_test "list" ".*\[0-9\].*main \\(int argc.*" "can list sources"
gdb_exit
@@ -179,11 +179,11 @@ foreach standalone {1 0} {
with_test_prefix "two JITers" {
clean_restart
gdb_load $binfile_dl2
if {![runto_main]} {
- return -1
+ return
}
set num_bps 0
set ws "\[ \t\]+"
gdb_test_multiple "maint info breakpoints" "have two jit breakpoints" {
@@ -108,11 +108,11 @@ for {set inf 2} {$inf <= $num_inferiors} {incr inf} {
"add inferior ${inf} with -exec "
gdb_test "inferior ${inf}" \
"Switching to inferior ${inf} .*" \
"switch to inferior ${inf}"
if {![runto_main]} {
- return -1
+ return
}
}
# Run tests on all inferiors.
for {set inf 1} {$inf <= $num_inferiors} {incr inf} {
@@ -23,11 +23,11 @@ if { [prepare_for_testing "failed to prepare" $testfile ${srcfile} debug] } {
return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "break -q here" \
"Breakpoint.*at.*" \
"breakpoint here"
@@ -19,12 +19,12 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc do_test { with_probes } {
clean_restart $::testfile
@@ -18,11 +18,11 @@ standard_testfile start.c
require support_displaced_stepping
save_vars { GDBFLAGS } {
set GDBFLAGS "$GDBFLAGS -ex \"set non-stop on\""
if { [prepare_for_testing "failed to prepare" ${testfile} $srcfile] } {
- return -1
+ return
}
}
if {![runto_main]} {
return
@@ -47,11 +47,11 @@ foreach_with_prefix pie { "nopie" "pie" } {
set err [eval $compile]
unset_board_info mathlib
}
if {$err != ""} {
untested "failed to compile"
- return -1
+ return
}
clean_restart $filename
gdb_breakpoint "*marker"
@@ -27,12 +27,12 @@ require {istarget "m32r-*-*"} {!istarget "*-*-linux*"}
standard_testfile overlays.c ovlymgr.c foo.c bar.c baz.c grbx.c
if {[build_executable $testfile.exp $testfile \
[list $srcfile $srcfile2 $srcfile3 $srcfile4 $srcfile5 $srcfile6] \
"debug ldscript=-Wl,-T$linker_script"] == -1} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
remote_exec build "mv ${testfile}.o foo.o bar.o baz.o grbx.o ovlymgr.o ${objdir}/${subdir}"
@@ -21,12 +21,12 @@
# This file was written by Fred Fish. (fnf@cygnus.com)
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_integer_literals_accepted {} {
global gdb_prompt
@@ -50,11 +50,11 @@ proc do_test {} {
# single-step. With remote debugging, the ctrl-c reaches GDB first.
with_test_prefix "run" {
clean_restart $testfile
if {![runto_main]} {
- return -1
+ return
}
do_test
}
@@ -41,15 +41,15 @@ proc address_get { testname } {
set test "set disable-randomization off"
gdb_test_multiple "${test}" "${test}" {
-re "Disabling randomization .* unsupported .*$gdb_prompt $" {
untested "disabling randomization is not supported on this Linux GDB"
- return -1
+ return
}
-re "No symbol .* in current context.*$gdb_prompt $" {
untested "disabling randomization is not supported on this GDB platform"
- return -1
+ return
}
-re "$gdb_prompt $" {
pass $test
}
}
@@ -96,11 +96,11 @@ gdb_test_multiple "" $test {
-re "^\r\nDisplay all 5 possibilities\\? \\(y or n\\)$" {
pass $test
}
-re "$gdb_prompt " {
fail $test
- return 0
+ return
}
}
send_gdb "y"
set test "ask message for 01 and 02"
@@ -152,11 +152,11 @@ save_vars { env(TERM) } {
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
if { ![readline_is_used] } {
unsupported "readline isn't used."
- return -1
+ return
}
save_vars { timeout env(GDBHISTSIZE) env(GDBHISTFILE) } {
set timeout 30
@@ -25,11 +25,11 @@ if { [build_executable "failed to build" $testfile $srcfile { debug }] == -1 } {
}
save_vars { GDBFLAGS } {
append GDBFLAGS " --readnever"
if { [clean_restart $testfile] == -1 } {
- return -1
+ return
}
}
if {![runto_main]} {
return
@@ -19,12 +19,12 @@
standard_testfile .c
append binfile .o
remote_exec build "rm -f ${binfile}"
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
clean_restart
#Check that invalid options are rejected.
@@ -25,11 +25,11 @@ foreach_with_prefix opts { "" "pie" } {
set testfile1_opt [list debug nowarnings $opts]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" \
executable ${testfile1_opt}] != "" } {
untested "failed to compile first testcase"
- return -1
+ return
}
# build the second test case
set testfile2 "reread2"
@@ -42,11 +42,11 @@ foreach_with_prefix opts { "" "pie" } {
if { [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
executable ${testfile2_opt1}] != ""
&& [gdb_compile "${srcdir}/${subdir}/${srcfile2}" "${binfile2}" \
executable ${testfile2_opt2}] != ""} {
untested "failed to compile second testcase"
- return -1
+ return
}
# Start with a fresh gdb.
set testfile "reread"
@@ -17,12 +17,12 @@
standard_testfile .c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
set allow_float_test [allow_float_test]
proc return_1 { type } {
@@ -21,12 +21,12 @@
standard_testfile .c
if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc_with_prefix test_setshow_annotate {} {
# Start with a fresh gdb
clean_restart $::testfile
@@ -40,11 +40,11 @@ if { [build_executable "build solib" $binfile_lib $srcfile_lib \
if { [prepare_for_testing "prepare" $testfile $srcfile $bin_flags] != 0 } {
return
}
if {![runto_main]} {
- return 0
+ return
}
# Run until the program dies.
gdb_test "cont" "Program received signal SIGABRT,.*"
@@ -93,7 +93,7 @@ if { $load_segment_count <= 2 } {
# Start GDB and run to main. If the shared library is causing issues
# then we will see an internal error once the inferior starts running.
clean_restart $testfile
if {![runto_main message]} {
- return 0
+ return
}
@@ -65,11 +65,11 @@ foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" {
lappend sep_lib_flags {debug}
}
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $sep_lib_flags] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {$libsepdebug == "SEP"} {
if {[gdb_gnu_strip_debug $binfile_lib] != 0} {
unsupported "could not split debug of $binfile_lib."
@@ -80,11 +80,11 @@ foreach libsepdebug {NO IN SEP} { with_test_prefix "$libsepdebug" {
}
clean_restart $executable
if {![runto_main]} {
- return 0
+ return
}
gdb_test "display (int) a_global" "1: \\(int\\) a_global = 41"
gdb_test "display (int) b_global" "2: \\(int\\) b_global = 42"
gdb_test "display (int) c_global" "3: \\(int\\) c_global = 43"
@@ -59,19 +59,19 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1"
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib1} $lib_flags] != ""
|| [gdb_compile_shlib ${srcfile_lib} ${binfile_lib2} $lib_flags] != ""
|| [gdb_compile ${srcfile} ${binfile} executable $bin_flags] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {[catch {exec prelink -N -r ${prelink_lib1} ${binfile_lib1}} output] != 0
|| [catch {exec prelink -N -r ${prelink_lib2} ${binfile_lib2}} output] != 0} {
# Maybe we don't have prelink.
verbose -log "prelink failed: $output"
untested "could not prelink ${binfile_lib1_test_msg} or ${binfile_lib2_test_msg}."
- return -1
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
set testpid [spawn_id_get_pid $test_spawn_id]
@@ -83,11 +83,11 @@ foreach prelink_lib1 {0x40000000 0x50000000} { with_test_prefix "$prelink_lib1"
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib1} $lib_flags] != ""
|| [gdb_compile_shlib ${srcfile_lib} ${binfile_lib2} $lib_flags] != ""} {
untested "failed to compile shared library"
kill_wait_spawned_process $test_spawn_id
- return -1
+ return
}
clean_restart ${binfile_base}
# This testcase currently does not support remote targets.
# gdb_load_shlib ${binfile_lib1}
@@ -88,11 +88,11 @@ gdb_continue "break_here"
set corefile [standard_output_file solib-search.core]
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
# Before we restart gdb, replace the libs with the "wrong" ones.
remote_exec build "ln -sf ${wrong_lib_subdir}/${libname1}.so ${binfile1_lib}"
remote_exec build "ln -sf ${wrong_lib_subdir}/${libname2}.so ${binfile2_lib}"
@@ -45,11 +45,11 @@ gdb_test "br foo2" \
"foo2 in main"
delete_breakpoints
if {![runto_main]} {
- return 0
+ return
}
# Break in the library.
gdb_test "br foo" \
"Breakpoint.*file.*${libname}\\.c.*" \
@@ -34,11 +34,11 @@ gdb_test_multiple "next" $test {
pass $test
}
-re "( test-fail .*|\r\nCannot insert breakpoint 0\\.\r\n.*)\r\n$gdb_prompt $" {
xfail $test
untested "system lacks support for tracking longjmps"
- return -1
+ return
}
}
gdb_test_no_output {delete $test_fail_bpnum}
gdb_breakpoint [gdb_get_line_number "break-run1"]
@@ -16,15 +16,15 @@
# 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
+ return
}
set bp_location [gdb_get_line_number "set breakpoint here"]
gdb_test "break $bp_location" \
@@ -26,11 +26,11 @@ set linefile ${testfile}.inp
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return
}
if {![runto_main]} {
- return 0
+ return
}
set remote_linefile [gdb_remote_download host ${srcdir}/${subdir}/${linefile}]
gdb_test "break f1" ".*Breakpoint 2 at .* file .*step-line.c.*"
@@ -23,11 +23,11 @@ remote_exec build "rm -f ${binfile}"
if { [prepare_for_testing "prepare" $testfile $srcfile] != 0 } {
return
}
if {![runto_main]} {
- return 0
+ return
}
# Set a breakpoint at line 45, if stepi then finish fails, we would
# run to the end of the program, which would mess up the rest of the tests.
@@ -140,14 +140,14 @@ gdb_test_multiple "finish" "$test" {
pass "$test"
}
-re ".*(Program received|$inferior_exited_re).*$gdb_prompt $" {
# Oops... We ran to the end of the program... Better reset
if {![runto_main]} {
- return 0
+ return
}
if {![runto step-test.c:45]} {
- return 0
+ return
}
fail "$test"
}
-re ".*${decimal}.*callee.*STEPI.*$gdb_prompt $" {
# On PA64, we end up at a different instruction than PA32.
@@ -22,11 +22,11 @@ require {!is_remote host}
standard_testfile style.c
with_ansi_styling_terminal {
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
- return -1
+ return
}
if {![runto_main]} {
return
}
@@ -26,11 +26,11 @@ standard_testfile .c
# Compile binary
# and start with a fresh gdb
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
# Test that the inferior sees EXPECTED env vars starting with
# "TEST_GDB".
proc test_num_test_vars {expected message} {
@@ -24,11 +24,11 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
{debug pthreads}]} {
return
}
if {![runto "parent_stop"]} {
- return -1
+ return
}
# We don't want to be bothered.
gdb_test_no_output "set confirm off"
@@ -40,17 +40,17 @@ gdb_test_multiple "continue" $test {
}
-re "Remote connection closed.*\r\n$gdb_prompt $" {
fail "$test (remote connection closed)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "The program is not being run\\.\r\n$gdb_prompt $" {
fail "$test (valgrind vgdb has terminated)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "\r\n$gdb_prompt $" {
pass "$test (false warning)"
}
}
@@ -40,17 +40,17 @@ while {$loop && $continue_count < 100} {
}
-re "Remote connection closed.*\r\n$gdb_prompt $" {
fail "$test (remote connection closed)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "The program is not being run\\.\r\n$gdb_prompt $" {
fail "$test (valgrind vgdb has terminated)"
# Only if valgrind got stuck.
kill_wait_spawned_process $valgrind_spawn_id
- return -1
+ return
}
-re "\r\n$gdb_prompt $" {
pass "$test (false warning)"
}
}
@@ -71,11 +71,11 @@ with_test_prefix "run" {
# Now, dump a core, and reload it.
with_test_prefix "core" {
set corefile [standard_output_file $testfile.core]
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
clean_restart ${testfile}
test_no_vdso "core-file $corefile"
@@ -24,12 +24,12 @@
set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests]
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# True if we're forcing no hardware watchpoints.
set no_hw 0
@@ -19,11 +19,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
set bp_location [gdb_get_line_number "START"]
if {![runto "wchar.c:$bp_location"]} {
- return -1
+ return
}
gdb_test "print narrow" "= 97 L'a'"
gdb_test "print single" "= 48879 L'\\\\xbeef'"
@@ -26,12 +26,12 @@ set opaque_testfile wrong_frame_bt_full-opaque
set opaque_objfile [standard_output_file "$opaque_testfile.o"]
if {[gdb_compile "${srcdir}/${subdir}/$opaque_testfile.c" \
$opaque_objfile \
object {}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[gdb_compile \
[list ${srcdir}/${subdir}/$main_testfile.c $opaque_objfile] \
[standard_output_file ${main_testfile}] \