}
if {![runto_main]} {
- return 0
+ return
}
# Verify that "advance <location>" works. (This is really just syntactic
}
if {![runto_main]} {
- return 0
+ return
}
set L1_bploc [gdb_get_line_number "set L1 breakpoint here" $srcfile]
}
}
if {![runto_main]} {
- return 0
+ return
}
set test "sanity check info shared"
gdb_test_multiple "info shared" $test {
if {$arch == ""} {
untested "no architecture set"
- return 0
+ return
}
# Start the program running and then wait for a bit, to be sure
# Check which target this board connects to. If testing with a native
# target board, this should cause the native target to auto connect.
if {![runto_main]} {
- return 0
+ return
}
# Returns true if the native target is pushed on the target stack.
}
if {![runto_main]} {
- return 0
+ return
}
set print_core_line [gdb_get_line_number "ABORT;"]
gdb_test "tbreak $print_core_line"
}
if {![runto_main]} {
- return 0
+ return
}
# Run to the breakpoint at return.
}
if {![runto callee]} {
- return 0
+ return
}
set test "up"
if {$notcurrent == $current} {
untested "target arch has an instruction after call as part of the caller line"
- return 0
+ return
}
set test "break"
}
if { ![runto_main] } {
- return 0
+ return
}
gdb_test "break stop_one" "Breakpoint \[0-9\]* at .*"
if {[gdb_test "call gen_signal ()" \
"\[\r\n\]*The program being debugged was signaled.*" \
"inferior function call signaled"] != 0} {
- return 0
+ return
}
set frame_number [get_dummy_frame_number]
}
if { ![runto_main] } {
- return 0
+ return
}
# Verify set may-call-functions behavior.
}
if {![runto_main]} {
- return 0
+ return
}
set bp_num [get_first_maint_bp_num]
# Now get past startup code.
if {![runto_main]} {
- return 0
+ return
}
with_test_prefix "after run to main" {
}
if {![runto_main]} {
- return 0
+ return
}
set marker " Break Here. "
}
if {![runto_main]} {
- return 0
+ return
}
set test_host "set breakpoint condition-evaluation host"
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break foo if zero()" "Breakpoint .*"
}
if {![runto_main]} {
- return 0
+ return
}
# Make sure the target doesn't hide the breakpoint hits (that don't
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"
set corefile [core_find $binfile {} $args]
if {$corefile == ""} {
untested "unable to create corefile"
- return 0
+ return
}
set corefile_2 "$binfile.2.core"
remote_exec build "mv $corefile $corefile_2"
set corefile [core_find $binfile {}]
if {$corefile == ""} {
untested "unable to create or find corefile"
- return 0
+ return
}
# Start GDB with COREFILE passed as a command line argument. COREOPT
set corefile [core_find $binfile {}]
if {$corefile == ""} {
untested "unable to create or find corefile"
- return 0
+ return
}
gdb_start
if { [build_executable "failed to prepare" ${testfile} \
[list $srcfile] $opts] } {
- return 0
+ return
}
clean_restart
if { [prepare_for_testing "failed to prepare" ${testfile} \
[list $srcfile] $opts] } {
- return 0
+ return
}
clean_restart
gdb_test "p a" { = \{1, 2\}} "no running process: p a"
if {![runto_main]} {
- return 0
+ return
}
gdb_test "p a" { = \{1, 2\}} "running process: p a"
&& ![istarget *-*-elf*]
&& ![istarget arm*-*-eabi*]
&& ![istarget powerpc-*-eabi*]} {
- return 0
+ return
}
standard_testfile .S
}
if { $address == -1 } {
- return 0
+ return
}
clean_restart $testfile
set status [remote_exec build "eu-strip -f ${binfile}.debug $binfile"]
if {[lindex $status 0] != 0} {
untested "failed to compile"
- return 0
+ return
}
clean_restart $testfile
}
if {![runto setup_done]} {
- return 0
+ return
}
set any "\[^\r\n\]*"
}
if {![runto_main]} {
- return 0
+ return
}
# This would put gdb into an infinite loop.
# Unnamed union is a GNU extension, thus we restrict the test
# to gcc compiler.
if { ![test_compiler_info gcc*] } {
- return 0
+ return
}
if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
gdb_load_shlib $libobj
if {![runto_main]} {
- return 0
+ return
}
# PR/1555 (was shlib 1280)
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "info locals" "\r\nb = .*"
# Start the inferior, and check neither of the libraries are loaded at
# the start.
if {![runto_main]} {
- return 0
+ return
}
check_info_shared "info sharedlibrary #1" 0 0
}
if {![runto setup_done]} {
- return 0
+ return
}
set any "\[^\r\n\]*"
}
if {![runto_main]} {
- return 0
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
if {![file exists $binfile]} {
- return 0
+ return
} else {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $binfile
}
if {![runto_main]} {
- return 0
+ return
}
set supported 0
clean_restart $testfile
if {![runto_main]} {
- return 0
+ return
}
gdb_test "list" "1\[ \t\]+in\[ \t\]+$srcfile"
}
if {$macro_support == 0} {
unsupported "skipping test because debug information does not include macro information."
- return 0
+ return
}
list_and_check_macro main WHERE {macscp1.c {before macscp1_3}}
# Start the program running.
if {! [runto_main]} {
- return 0
+ return
}
# Set a breakpoint on each of the functions.
}
if {![runto normal_func]} {
- return 0
+ return
}
# Make a pattern to match 'maint info blocks' output. ARGS is the
set corefile [core_find $binfile]
if {$corefile == ""} {
untested "unable to create or find corefile"
- return 0
+ return
}
# Limit is in kb, so this is 4MB.
}
if {![runto_main]} {
- return 0
+ return
}
# Run "show max-value-size" and return the interesting bit of the
#
if {![runto_main]} {
- return 0
+ return
}
# couple of convenience variables
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break [gdb_get_line_number "break here"]" \
if { $found == 0 } {
warning "can't generate a core file - prelink tests suppressed - check ulimit -c"
- return 0
+ return
}
# Relink $libfile to a different address.
}
if {![runto_main]} {
- return 0
+ return
}
set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
}
if {![runto_main]} {
- return 0
+ return
}
if {[allow_python_tests]} {
gdb_load ${binfile}
if {![runto_main]} {
- return 0
+ return
}
# With a running target, printf convenience vars should of course work.
# expected holes will be present in the struct.
if { ![is_lp64_target] } {
untested "test work only on lp64 targets"
- return 0
+ return
}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
# expected holes will be present in the struct.
if { ![is_lp64_target] } {
untested "test work only on lp64 targets"
- return 0
+ return
}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
}
if {![runto_main]} {
- return 0
+ return
}
set invalid_register_re "Invalid register \[^\r\n\]*"
gdb_load $binfile_main
if {![runto_main]} {
- return 0
+ return
}
# Running the command 'info sharedlibrary' should output a path to
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
proc process_saved_regs { current inner outer } {
}
if {![runto_main]} {
- return 0
+ return
}
# Verify that set command without assignment emits a warning.
# Load up the shared objects
if {![runto_main]} {
- return 0
+ return
}
#
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
# Stop in handle, when at the inner most level
#
if {![runto_main]} {
- return 0
+ return
}
# If we can examine what's at memory address 0, it is possible that we
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
# Run to the signal.
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
# Run to the signal.
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
# Run to the signal.
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
# Run to the signal.
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
# Pass all the alarms straight through (but verbosely)
#
if {![runto_main]} {
- return 0
+ return
}
# If we can examine what's at memory address 0, it is possible that we
# Advance to main
if {![runto_main]} {
- return 0
+ return
}
# Run to the signal handler wait loop.
set gdbserver_reconnect_p 1
if { [info proc gdb_reconnect] == "" } {
unsupported "requires gdbserver reconnect"
- return 0
+ return
}
set testfile solib-disc
gdb_load_shlib $libobj
if {![runto_main]} {
- return 0
+ return
}
gdb_test_no_output "set stop-on-solib-events 1"
pass "reconnect after load"
} else {
fail "reconnect after load"
- return 0
+ return
}
gdb_test "print/x \$pc" "${::valnum_re} = $saved_pc" "check \$pc after load"
pass "reconnect after unload"
} else {
fail "reconnect after unload"
- return 0
+ return
}
gdb_test "print/x \$pc" "${::valnum_re} = $saved_pc" "check \$pc after unload"
if {([istarget *-*-mingw*]
|| [istarget *-*-cygwin*]
|| [istarget *-*-pe*])} {
- return 0
+ return
}
# This test uses GCC-specific syntax.
if {![test_compiler_info "gcc-*"]} {
- return 0
+ return
}
proc do_test { lib1opts lib2opts lib1first } {
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "source ${srcdir}/${subdir}/source-execution.gdb" \
}
if {![runto_main]} {
- return 0
+ return
}
delete_breakpoints
}
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint [gdb_get_line_number "set foo break here"]
}
if {![runto_main]} {
- return 0
+ return
}
|| [test_compiler_info {gcc-[0-3]-*}]
|| [test_compiler_info {gcc-4-0-*}]
|| [test_compiler_info {clang-[0-4]=*}] } {
- return 0
+ return
}
standard_testfile
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "f" \
} elseif {[is_ilp32_target]} {
set target_size TARGET_ILP32
} else {
- return 0
+ return
}
set main_basename sym-file-main
"ln -sf $srcdir/$subdir/$srcfile $srcfilelink"]
if {[lindex $status 0] != 0} {
unsupported "$test (host does not support symbolic links)"
- return 0
+ return
}
if {[prepare_for_testing $testfile $testfile $srcfilelink]} {
"test info terminal pre-execution"
if {![runto break_here]} {
- return 0
+ return
}
# Read the inferior's terminal settings, saved in the T global variable.
gdb_load_shlib ${libobj}
if {![runto_main]} {
- return 0
+ return
}
}
if {![runto_main]} {
- return 0
+ return
}
# Without debug information, the program stops at the next
set bp_location21 [gdb_get_line_number "set breakpoint 21 here"]
if {![runto_main]} {
- return 0
+ return
}
# Verify that "until <location>" works. (This is really just syntactic
}
if {![runto_main]} {
- return 0
+ return
}
# Return a two element list, the first element is the stack-pointer
}
if { ![runto_main] } {
- return 0
+ return
}
gdb_test "break stop_here" "Breakpoint \[0-9\]* at .*"
"\"set unwind-on-signal off\"\\. Evaluation of the expression containing" \
"the function \\(gen_signal\\) will be abandoned\\."] \
"unwindonsignal, inferior function call signaled"] != 0} {
- return 0
+ return
}
# Verify the stack got unwound.
}
if {![runto_main]} {
- return 0
+ return
}
# The line we'll be stepping.