This patch contains fixes for alpha, arc, avr, hppa and sh architectures.
Some changes are the result of running:
$ sed -i 's/^ return -1/ return/' *.exp
and
$ sed -i 's/^ return 0/ return/' *.exp
inside gdb/testsuite/gdb.arch and some are manual changes.
I didn't include changes made to return statements inside procedures.
Approved-By: Tom Tromey <tom@tromey.com>
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
unsupported "failed to compile"
- return -1
+ return
}
clean_restart
set options {}
if { [prepare_for_testing "failed to prepare" $testfile $srcfile $options] } {
- return -1
+ return
}
if {![runto_main]} {
- return 0
+ return
}
# Convert list of saved registers and their offsets to a GDB string.
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "break dbnz1" \
standard_testfile .S
if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
- return -1
+ return
}
if {![runto_main]} {
- return 0
+ return
}
# Helper function that reads properties of instruction from the ELF file via
# The __flash qualifier was added in GCC 4.7.
if {[test_compiler_info {gcc-[0-4]-[0-6]}]} {
- verbose "Skipping ${gdb_test_file_name}."
- return
+ verbose "Skipping ${gdb_test_file_name}."
+ return
}
standard_testfile
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
if {![runto [gdb_get_line_number "break here."]]} {
- untested "could not run to \"break here.\""
- return -1
+ untested "could not run to \"break here.\""
+ return
}
gdb_test "print pointer_to_flash" \
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
#
if {![runto_main]} {
- return 0
+ return
}
gdb_test "b sub1" "Breakpoint 2.*" "set breakpoint"
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable ""] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
#
if {![runto_main]} {
- return 0
+ return
}
gdb_test "advance sub1" "hello world\r\n$hex in sub1 \\(\\)" "get to sub1"
# Note we have to compile WITH optimization and WITHOUT debugging information to expose the bug.
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {"additional_flags=-O2"}] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {}] != "" } {
unsupported "failed to compile"
- return -1
+ return
}
clean_restart
}
if {![runto_main]} {
- return 0
+ return
}
set foo [get_addr_of_sym "foo"]
set test "core at last insn in foo"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "*$foo_last"
gdb_test "continue" "Breakpoint \[0-9\]*,.* in foo.*" "$test: continue to breakpoint"
set test "core at nullified insn"
if {![runto_main]} {
- return 0
+ return
}
gdb_breakpoint "*$foo_last"
gdb_test "continue" "Breakpoint \[0-9\]*,.* in foo.*" "$test: continue to breakpoint"