@@ -25,11 +25,11 @@ standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test_no_output "python import gdb.types"
# test get_basic_type const stripping
@@ -25,11 +25,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
proc test_as_string { } {
gdb_test "p \$_as_string(2)" "\"2\""
gdb_test "p \$_as_string(enum_valid)" "\"ENUM_VALUE_B\""
@@ -25,11 +25,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
global hex decimal
gdb_breakpoint [gdb_get_line_number "Block break here."]
gdb_continue_to_breakpoint "Block break here."
@@ -25,11 +25,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "bottom_func"
gdb_continue_to_breakpoint "bottom_func"
@@ -25,11 +25,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
# Test a simple command.
gdb_test_multiline "input simple command" \
@@ -24,11 +24,11 @@ standard_testfile .c .py
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
return
}
if { ![runto_main] } {
- return 0
+ return
}
set host_python_file \
[gdb_remote_download host $srcdir/$subdir/$srcfile2]
@@ -27,11 +27,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
if { [target_info exists gdb_protocol] } {
set connection_type "RemoteTargetConnection"
} else {
@@ -42,11 +42,11 @@ gdb_test_multiple $test $test {
set test2 ""
}
}
if {$test2 == ""} {
- return 0
+ return
}
set remote_python_file [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
@@ -25,11 +25,11 @@ standard_testfile .cc
if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
return
}
if {![runto_main]} {
- return 0
+ return
}
set pyfile [gdb_remote_download host \
${srcdir}/${subdir}/${testfile}.py]
@@ -22,11 +22,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint [gdb_get_line_number "break-here"]
gdb_continue_to_breakpoint "Block break here."
@@ -27,11 +27,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
}
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint [gdb_get_line_number "Block break here."]
gdb_continue_to_breakpoint "Block break here."
gdb_py_test_silent_cmd "python bf1 = gdb.selected_frame ()" "get frame" 0
@@ -208,11 +208,11 @@ gdb_exit
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
# Test if Frame.static_link works for a frame without debug info.
gdb_test "python print(gdb.selected_frame().static_link())" "None" \
"test Frame.static_link for a frame without debug info"
@@ -60,11 +60,11 @@ gdb_test "python \
"read memory without execution"
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
# The most recently added inferior.
set most_recent_inf 1
@@ -38,11 +38,11 @@ gdb_test_multiline "install new_thread event handler" \
"end" ""
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
gdb_test "python print(seen_a_thread)" "True"
# Test basic gdb.Inferior attributes and methods.
@@ -54,11 +54,11 @@ set remote_python_file \
# Generate a core file.
set corefile [core_find $binfile {}]
if {$corefile == ""} {
unsupported "core file not generated"
- return 0
+ return
}
# Create a directory named DIRNAME for use as the
# debug-file-directory. Populate the directory with links (based on
# the build-ids) to each file in the list FILES.
@@ -25,11 +25,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
set python_error_text "Error occurred in Python.*"
gdb_py_test_silent_cmd "python sym = gdb.lookup_symbol(\"some_var\")" \
@@ -118,11 +118,11 @@ gdb_test "python print(objfile.username)" "None" \
if { [prepare_for_testing "failed to prepare" ${testfile}2 ${srcfile} {nodebug ldflags=-Wl,--strip-debug}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
gdb_py_test_silent_cmd "python objfile = gdb.objfiles()\[0\]" \
"Get no-debug objfile file" 1
@@ -24,11 +24,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
gdb_breakpoint [gdb_get_line_number "Break here"]
@@ -25,11 +25,11 @@ standard_testfile py-rbreak.c py-rbreak-func2.c
if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } {
return 1
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test_no_output "nosharedlibrary"
gdb_py_test_silent_cmd "py sl = gdb.rbreak(\"\",minsyms=False)" \
"get all function breakpoints" 0
@@ -38,11 +38,11 @@ gdb_test "source ${pyfile}" "Python script imported" \
"import python scripts"
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
proc cont_and_backtrace { tst } {
@@ -42,11 +42,11 @@ clean_restart $testfile
gdb_load_shlib ${library}
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
runto [gdb_get_line_number "Break to end."]
# Test gdb.solib_name
@@ -25,11 +25,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
proc test_all_strfns { } {
gdb_test "p \$_streq (str1, str2)" " = 1"
gdb_test "p \$_streq (str1, str3)" " = 0"
@@ -88,11 +88,11 @@ gdb_test "python print (gdb.lookup_static_symbol ('nonexistent') is None)" \
gdb_test "python print (gdb.lookup_static_symbol ('qq') is None)" \
"True" "lookup_static_symbol for global var"
if {![runto_main]} {
- return 0
+ return
}
global hex decimal
gdb_breakpoint [gdb_get_line_number "Block break here."]
@@ -203,11 +203,11 @@ gdb_test "python print (gdb.lookup_global_symbol ('(anonymous namespace)::anon')
"True" "anon is None"
gdb_test "python print (gdb.lookup_static_symbol ('(anonymous namespace)::anon').value ())" \
"10" "print value of anon"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint [gdb_get_line_number "Break in class."]
gdb_continue_to_breakpoint "Break in class."
@@ -231,11 +231,11 @@ gdb_test "python print (cplusfunc.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "t
# Test is_valid when the objfile is unloaded. This must be the last
# test as it unloads the object file in GDB.
# Start with a fresh gdb.
clean_restart ${::testfile}
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint [gdb_get_line_number "Break at end."]
gdb_continue_to_breakpoint "Break at end for symbol validity" ".*Break at end.*"
gdb_py_test_silent_cmd "python a = gdb.lookup_symbol(\'a\')" "Get variable a" 0
@@ -25,11 +25,11 @@ standard_testfile py-symbol.c
if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return
}
if {![runto_main]} {
- return 0
+ return
}
set debug_types [debug_types]
global hex decimal
@@ -27,11 +27,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
return
}
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
gdb_breakpoint "foo"
@@ -45,11 +45,11 @@ standard_testfile
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
return
}
if {![runto_main]} {
- return 0
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
gdb_breakpoint [gdb_get_line_number "Break here"]
@@ -35,11 +35,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug $fla
require is_x86_64_m64_target
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
# Check for the corrupt backtrace.
proc check_for_broken_backtrace {testname} {
gdb_test_sequence "where" $testname {
@@ -819,11 +819,11 @@ test_float_conversion
test_add_to_history
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
test_unavailable
test_value_in_inferior
test_value_from_buffer
@@ -208,11 +208,11 @@ gdb_expect {
clean_restart ${testfile}
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
set lineno [gdb_get_line_number "Break to end."]
runto $lineno
@@ -422,11 +422,11 @@ gdb_test_multiple "set extended-prompt some param \\p{python print-stack} " \
clean_restart ${testfile}
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
# print-stack settings
gdb_test "show python print-stack" \
"The mode of Python stack printing on error is \"message\".*" \
@@ -477,11 +477,11 @@ gdb_py_test_silent_cmd "python gdb.prompt_hook = None" \
clean_restart ${testfile}
# The following tests require execution.
if {![runto_main]} {
- return 0
+ return
}
runto [gdb_get_line_number "Break at func2 call site."]
gdb_py_test_silent_cmd "python line = gdb.selected_frame().find_sal().line" "Get line number of func2 call site" 1