@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
@@ -21,12 +21,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# When varobj reports the types of objects, it often isn't really reporting
# the type as GDB knows it. For example, in this testcase, we have a
# structure which has been typedefed. A varobj of this type would really have
@@ -22,12 +22,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
@@ -16,12 +16,12 @@
load_lib mi-support.exp
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Test the resolution of PR 18077
#
# When doing an -exec-run with a fresh copy of GDB, it would result in
@@ -21,23 +21,23 @@
# mi_run_cmd, it ignores whatever target the rest of GDB testsuite is
# using, and always tries to run natively. So, don't do anything unless
# we're actually testing native.
require isnative
if {![istarget *-linux*]} {
- return
+ return
}
# Check if start command is supported.
require !use_gdb_stub
load_lib mi-support.exp
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# The plan is for async mode to become the default but toggle for now.
save_vars { GDBFLAGS } {
set GDBFLAGS [concat $GDBFLAGS " -ex \"set mi-async on\""]
@@ -35,12 +35,12 @@ standard_testfile basics.c
set escapedobjdir [string_to_regexp ${objdir}]
set testsubdir [standard_output_file ""]
set envirodir [string_to_regexp $testsubdir]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# In this file we want to test if the operations needed by the following
# procedures work, so it makes no sense using them here.
@@ -22,12 +22,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[build_executable $testfile.exp $testfile $srcfile {c++ debug}] == -1} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
set loc_ns_func_line [gdb_get_line_number "location NS::func here"]
set loc_foo_func_line [gdb_get_line_number "location foo::func here"]
set loc_func_line [gdb_get_line_number "location func here"]
@@ -24,12 +24,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Locate line numbers in basics.c.
set line_callee4_head [gdb_get_line_number "callee4 ("]
set line_callee4_body [expr {$line_callee4_head + 2}]
@@ -23,12 +23,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_gdb_test "-interpreter-exec" \
@@ -20,12 +20,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_command_param_changed { } {
global scheduler_locking_supported
global binfile
@@ -20,12 +20,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
# Don't run to main to avoid increasing the search scope to include
@@ -47,12 +47,12 @@ proc semihosted_string { string } {
}
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -28,11 +28,11 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
}
set corefile [core_find $binfile {}]
if {$corefile == ""} {
untested "unable to create or find corefile"
- return 0
+ return
}
if {[mi_gdb_start]} {
return
}
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
@@ -24,12 +24,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_disassembly_only {} {
global mi_gdb_prompt
global hex
@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -33,12 +33,12 @@ require !use_gdb_stub
set have_startup_shell [have_startup_shell]
standard_testfile mi-start.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "could not build mi-exec-run"
- return -1
+ untested "could not build mi-exec-run"
+ return
}
# The test proper. INFTTY_MODE determines whether "set inferior-tty"
# is in effect. MI_MODE determines whether MI is run on the main UI,
# or as a separate UI. FORCE_FAIL is true when we want -exec-run to
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart]} {
return
}
@@ -21,12 +21,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile "mi-read-memory"
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}.c" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
mi_next_to "main" "" "mi-read-memory.c" "20" "next at main"
@@ -24,12 +24,12 @@ set MIFLAGS "-i=mi"
standard_testfile basics.c
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable {debug}] != "" } then {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Return the address of the specified breakpoint.
proc breakpoint_address {bpnum} {
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -139,12 +139,12 @@ mi_send_resuming_command "exec-continue" "continuing execution to thread conditi
# Check if we stopped in thread 2 like we should.
set testname "run till MI pending breakpoint on pendfunc3 on thread 2"
gdb_expect {
-re "\\*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"4\",frame=\{addr=\"$hex\",func=\"pendfunc3\".*thread-id=\"2\".*" {
pass $testname
- return 0
+ return
}
timeout {
fail "$testname (timeout)"
- return -1
+ return
}
}
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
@@ -23,12 +23,12 @@ require dwarf2_support
require is_x86_64_m64_target
standard_testfile .S
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nopie}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc sparc_register_tests_no_exec { } {
# Test the generic IDT chip.
mi_gdb_test "111-data-list-register-values" \
@@ -25,12 +25,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -33,12 +33,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
@@ -46,11 +46,11 @@ if {[supports_process_record]} {
# Activate process record/replay
if {[mi_gdb_test "-interpreter-exec console record" \
"=record-started,thread-group=\"i1\",method=\"full\"\r\n\\^done" \
"Turn on process record"]} {
warning "Fail to activate process record/replay, tests in this group will not be performed.\n"
- return -1
+ return
}
}
# Locate line numbers in basics.c.
set line_callee4_head [gdb_get_line_number "callee4 ("]
@@ -28,12 +28,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -28,12 +28,12 @@ set lib_flags [list debug]
set srcfile_main ${srcdir}/${subdir}/$srcfile
set bin_flags [list debug shlib=${binfile_lib}]
if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
|| [gdb_compile ${srcfile_main} ${binfile} executable $bin_flags] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -26,12 +26,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -22,12 +22,12 @@ set MIFLAGS "-i=mi"
require !use_gdb_stub
standard_testfile mi-start.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "could not build mi-start"
- return -1
+ untested "could not build mi-start"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -24,12 +24,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_stepi_nexti {} {
global mi_gdb_prompt
global hex fullname_syntax srcfile
@@ -23,12 +23,12 @@ set MIFLAGS "-i=mi"
set any "\[^\"\]+"
standard_testfile
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
mi_clean_restart $::testfile
mi_runto_main
@@ -25,12 +25,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile until.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -590,11 +590,11 @@ set inline_tests {
# Needs to be last, following tests rely on this.
lappend inline_tests floating
foreach_with_prefix inline_test $inline_tests {
if { [mi_run_inline_test $inline_test] < 0 } {
- return -1
+ return
}
}
# Since the inline test framework does not really work with
# function calls, first to inline tests and then do the remainder
@@ -19,12 +19,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile .cc
if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -39,11 +39,11 @@ set inline_tests {
path_expression
}
foreach_with_prefix inline_test $inline_tests {
if { [mi_run_inline_test $inline_test] < 0 } {
- return -1
+ return
}
}
set lineno [gdb_get_line_number "/* anonymous_structs_and_unions */"]
mi_create_breakpoint "$srcfile:$lineno" \
@@ -116,10 +116,10 @@ set inline_tests {
skip_type_update_when_not_use_rtti
}
foreach_with_prefix inline_test $inline_tests {
if { [mi_run_inline_test $inline_test] < 0 } {
- return -1
+ return
}
}
mi_gdb_exit
@@ -23,12 +23,12 @@ set MIFLAGS "-i=mi"
standard_testfile vla.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" \
"${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
if {[mi_clean_restart $::testfile]} {
return
}
@@ -24,12 +24,12 @@ set MIFLAGS "-i=mi"
standard_testfile vla.f90
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
{debug f90}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
# Depending on the compiler being used,
# the type names can be printed differently.
set real [fortran_real4]
@@ -32,12 +32,12 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
standard_testfile basics.c
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
- untested "failed to compile"
- return -1
+ untested "failed to compile"
+ return
}
proc test_watchpoint_creation_and_listing {} {
global mi_gdb_prompt
global srcfile
@@ -42,11 +42,11 @@ foreach name {different breakhere_different breakhere_validity breakhere_invalid
# Test various kinds of `set print entry-values'.
with_test_prefix "entry-values=no" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values no" {\^done} "no: set print entry-values"
mi_send_resuming_command "exec-continue" "no: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "no: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "no: entry_equal: -stack-list-variables"
@@ -61,11 +61,11 @@ with_test_prefix "entry-values=no" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "no: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=only" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values only" {\^done} "only: set print entry-values"
mi_send_resuming_command "exec-continue" "only: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "only: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "only: entry_equal: -stack-list-variables"
@@ -80,11 +80,11 @@ with_test_prefix "entry-values=only" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "only: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=preferred" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values preferred" {\^done} "preferred: set print entry-values"
mi_send_resuming_command "exec-continue" "preferred: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val@entry",value="5"}} .* .* {.* disp="keep"} "preferred: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val@entry",arg="1",value="5"}\]} "preferred: entry_equal: -stack-list-variables"
@@ -99,11 +99,11 @@ with_test_prefix "entry-values=preferred" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv@entry",arg="1",value="<optimized out>"}\]} "preferred: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=if-needed" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values if-needed" {\^done} "if-needed: set print entry-values"
mi_send_resuming_command "exec-continue" "if-needed: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"}} .* .* {.* disp="keep"} "if-needed: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"}\]} "if-needed: entry_equal: -stack-list-variables"
@@ -118,11 +118,11 @@ with_test_prefix "entry-values=if-needed" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "if-needed: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=both" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values both" {\^done} "both: set print entry-values"
mi_send_resuming_command "exec-continue" "both: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "both: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "both: entry_equal: -stack-list-variables"
@@ -137,11 +137,11 @@ with_test_prefix "entry-values=both" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"},{name="inv@entry",arg="1",value="<optimized out>"}\]} "both: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=compact" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values compact" {\^done} "compact: set print entry-values"
mi_send_resuming_command "exec-continue" "compact: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "compact: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "compact: entry_equal: -stack-list-variables"
@@ -156,11 +156,11 @@ with_test_prefix "entry-values=compact" {
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="inv",arg="1",value="<optimized out>"}\]} "compact: invalid: -stack-list-variables"
}
with_test_prefix "entry-values=default" {
if {[mi_runto_main] == -1} {
- return -1
+ return
}
mi_gdb_test "-gdb-set print entry-values default" {\^done} "default: set print entry-values"
mi_send_resuming_command "exec-continue" "default: entry_equal: continue"
mi_expect_stop "breakpoint-hit" .* {{name="val",value="5"},{name="val@entry",value="5"}} .* .* {.* disp="keep"} "default: entry_equal: stop"
mi_gdb_test "-stack-list-variables --all-values" {\^done,variables=\[{name="val",arg="1",value="5"},{name="val@entry",arg="1",value="5"}\]} "default: entry_equal: -stack-list-variables"