}
if {![runto_main]} {
- return -1
+ return
}
# First, use 'maint print reggroups' to get a list of all register
}
if {![runto_main]} {
- return -1
+ return
}
# First, use 'info registers' to get a list of register names.
}
if {![runto_main]} {
- return -1
+ return
}
# Test python/15461. Invalid architectures should not trigger an
# Now build the object files.
if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" ${f1_o} object {}] != ""} {
- untested "failed to compile object file f1.o"
- return -1
+ untested "failed to compile object file f1.o"
+ return
}
if {[gdb_compile "${srcdir}/${subdir}/${srcfile3}" ${f2_o} object {}] != ""} {
- untested "failed to compile object file f2.o"
- return -1
+ untested "failed to compile object file f2.o"
+ return
}
# Copy the two Python scripts to where the tests are being run.
}
if {![runto_main]} {
- return -1
+ return
}
set safe_path [standard_output_file ""]
if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile object \
"debug"] != "" } {
untested "failed to compile object file $testfile"
- return -1
+ return
}
clean_restart $testfile
} else {
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if { ![runto_main] } {
fail "can't run to main"
- return 0
+ return
}
}
if {![runto_main]} {
fail "cannot run to main."
- return 0
+ return
}
gdb_test_no_output "source ${pyfile}" "load python file"
c = <Enter 2 to explore this field of type 'char'>.*"
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
set SS_fields [field_values {a = 10} {d = 100[.].*}]
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
gdb_load_shlib ${lib_sl}
if {![runto_main]} {
- return 0
+ return
}
set python_file [gdb_remote_download host \
"import python scripts"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "increase_2"
set cond_line [gdb_get_line_number "Condition Break."]
if {![runto_main]} {
- return 0
+ return
}
gdb_test "print do_nothing" "no debug info.*" "ensure that shared lib has no debug info"
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break ${cond_line} if test_1(i,8)" "Breakpoint .* at .*" \
"import python scripts"
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break ${cond_line} if test(i,8)" \
"import python scripts"
if {![runto_main]} {
- return 0
+ return
}
# return address in dummy frame
with_test_prefix "inferior exit" {
if {![runto "test_exec_exit"]} {
- return 0
+ return
}
gdb_test_no_output "set var self_exec = 0" "switch to exit() test"
with_test_prefix "inferior exec" {
if {![runto "test_exec_exit"]} {
- return 0
+ return
}
gdb_test "python SimpleFinishBreakpoint(gdb.newest_frame())" "SimpleFinishBreakpoint init" "set FinishBP after the exec"
[list debug \
nopie \
additional_flags=-DFUNCTION_NAME=${func_name}]] == -1} {
- return -1
+ return
}
}
clean_restart $testfile_foo
if {![runto_main]} {
- return -1
+ return
}
# Check the gdb.format_address method when using the default values
}
if {![runto_main]} {
- return -1
+ return
}
# Run to our test breakpoint.
}
if {![runto_main]} {
- return -1
+ return
}
# Use Python to print the value of the 'some_label' symbol.
}
if {![runto_main]} {
- return -1
+ return
}
gdb_test "python print(gdb.selected_frame().function().symtab.fullname())" \
with_test_prefix "verbose off" {
if {![prepare_test]} {
- return -1
+ return
}
gdb_test_no_output "set verbose off"
with_test_prefix "verbose on" {
if {![prepare_test]} {
- return -1
+ return
}
gdb_test_no_output "set verbose on"
with_test_prefix "replace" {
if {![prepare_test]} {
- return -1
+ return
}
gdb_test_no_output "py gdb.printing.register_pretty_printer(gdb, lookup_function_lookup_test)"
}
if {![can_spawn_for_attach]} {
- return 0
+ return
}
set test_spawn_id [spawn_wait_for_attach $binfile]
}
if {![runto_main]} {
- return -1
+ return
}
gdb_py_run_memory_leak_test ${srcdir}/${subdir}/${testfile}.py \
standard_testfile
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 }
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
+ return
+}
if {![runto_main]} {
return
standard_testfile
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 }
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
+ return
+}
if {![runto_main]} {
return
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
}
if {![runto_main]} {
- return -1
+ return
}
gdb_breakpoint [gdb_get_line_number "Break here."]
if {[allow_cplus_tests]} {
if { [build_inferior "${binfile}-cxx" "c++"] < 0 } {
- return -1
+ return
}
with_test_prefix "c++" {
test_subscript_regression "${binfile}-cxx" "c++"
}
if {![runto_main]} {
- return -1
+ return
}
set xmethods_script [gdb_remote_download host \
"print (23)" "" \
"end" "not supported.*"
- return -1
+ return
}
-re "$gdb_prompt $" {}
}