test suite update - gdb.base/[cd]

Convert files gdb.base/[cd]*.exp to use standard_output_file et al.

	* call-ar-st.exp, call-rt-st.exp, call-sc.exp,
	call-signal-resume.exp, call-strs.exp, callexit.exp,
	callfuncs.exp, catch-load.exp, catch-syscall.exp, charset.exp,
	checkpoint.exp, chng-syms.exp, code-expr.exp, code_elim.exp,
	commands.exp, completion.exp, complex.exp, cond-expr.exp,
	condbreak.exp, consecutive.exp, constvars.exp, corefile.exp,
	ctxobj.exp, cursal.exp, cvexpr.exp, dbx.exp, default.exp,
	define.exp, del.exp, detach.exp, dfp-test.exp, display.exp,
	dmsym.exp, dump.exp, dup-sect.exp: Use standard_testfile,
	standard_output_file, prepare_for_testing, clean_restart.
This commit is contained in:
Tom Tromey 2013-06-27 18:49:03 +00:00
parent a64d25307d
commit f76495c88c
36 changed files with 176 additions and 341 deletions

View File

@ -1,3 +1,16 @@
2013-06-27 Tom Tromey <tromey@redhat.com>
* call-ar-st.exp, call-rt-st.exp, call-sc.exp,
call-signal-resume.exp, call-strs.exp, callexit.exp,
callfuncs.exp, catch-load.exp, catch-syscall.exp, charset.exp,
checkpoint.exp, chng-syms.exp, code-expr.exp, code_elim.exp,
commands.exp, completion.exp, complex.exp, cond-expr.exp,
condbreak.exp, consecutive.exp, constvars.exp, corefile.exp,
ctxobj.exp, cursal.exp, cvexpr.exp, dbx.exp, default.exp,
define.exp, del.exp, detach.exp, dfp-test.exp, display.exp,
dmsym.exp, dump.exp, dup-sect.exp: Use standard_testfile,
standard_output_file, prepare_for_testing, clean_restart.
2013-06-27 Tom Tromey <tromey@redhat.com> 2013-06-27 Tom Tromey <tromey@redhat.com>
* a2-run.exp, all-bin.exp, annota1.exp, annota3.exp, anon.exp, * a2-run.exp, all-bin.exp, annota1.exp, annota3.exp, anon.exp,

View File

@ -17,28 +17,13 @@
set testfile "call-ar-st" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Test depends on printf, which the sparclet stub doesn't support. # Test depends on printf, which the sparclet stub doesn't support.
if { [istarget "sparclet-*-*"] } { if { [istarget "sparclet-*-*"] } {
return 0 return 0
} }
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "couldn't compile ${srcdir}/${subdir}/${srcfile}"
return -1
}
# Create and source the file that provides information about the compiler
# used to compile the test case.
if [get_compiler_info] {
return -1
}
# Some targets can't call functions, so don't even bother with this # Some targets can't call functions, so don't even bother with this
# test. # test.
if [target_info exists gdb,cannot_call_functions] { if [target_info exists gdb,cannot_call_functions] {
@ -47,15 +32,22 @@ if [target_info exists gdb,cannot_call_functions] {
continue continue
} }
# Create and source the file that provides information about the compiler
# used to compile the test case.
if [get_compiler_info] {
return -1
}
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
untested $testfile.exp
return -1
}
set oldtimeout $timeout set oldtimeout $timeout
set timeout [expr "$timeout + 60"] set timeout [expr "$timeout + 60"]
# Start with a fresh gdb.
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off" gdb_test_no_output "set print address off"
gdb_test_no_output "set width 0" gdb_test_no_output "set width 0"

View File

@ -21,10 +21,7 @@
set testfile "call-rt-st" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Test depends on printf, which the sparclet stub doesn't support. # Test depends on printf, which the sparclet stub doesn't support.
if { [istarget "sparclet-*-*"] } { if { [istarget "sparclet-*-*"] } {
@ -55,10 +52,7 @@ if [target_info exists gdb,cannot_call_functions] {
# Start with a fresh gdb. # Start with a fresh gdb.
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off" gdb_test_no_output "set print address off"
gdb_test_no_output "set width 0" gdb_test_no_output "set width 0"

View File

@ -28,9 +28,7 @@ if [target_info exists gdb,cannot_call_functions] {
continue continue
} }
set testfile "call-sc" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Create and source the file that provides information about the # Create and source the file that provides information about the
# compiler used to compile the test case. # compiler used to compile the test case.
@ -47,7 +45,6 @@ proc start_scalars_test { type } {
global testfile global testfile
global srcfile global srcfile
global binfile global binfile
global objdir
global subdir global subdir
global srcdir global srcdir
global gdb_prompt global gdb_prompt
@ -57,7 +54,7 @@ proc start_scalars_test { type } {
set flags "debug additional_flags=-DT=${type}" set flags "debug additional_flags=-DT=${type}"
set testfile "call-sc-${type}" set testfile "call-sc-${type}"
set binfile ${objdir}/${subdir}/${testfile} set binfile [standard_output_file ${testfile}]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "${flags}"] != "" } {
# built the second test case since we can't use prototypes # built the second test case since we can't use prototypes
warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES" warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"

View File

@ -31,9 +31,7 @@ if [target_info exists gdb,nosignals] {
} }
set testfile "call-signals" standard_testfile call-signals.c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested call-signal-resume.exp untested call-signal-resume.exp
@ -61,10 +59,7 @@ proc get_dummy_frame_number { } {
# Start with a fresh gdb. # Start with a fresh gdb.
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if { ![runto_main] } { if { ![runto_main] } {
fail "Can't run to main" fail "Can't run to main"

View File

@ -23,22 +23,13 @@
#debug strarg #debug strarg
set testfile "call-strs" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Test depends on printf, which the sparclet stub doesn't support. # Test depends on printf, which the sparclet stub doesn't support.
if { [istarget "sparclet-*-*"] } { if { [istarget "sparclet-*-*"] } {
return 0 return 0
} }
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested call-strs.exp
return -1
}
# Some targets can't call functions, so don't even bother with this # Some targets can't call functions, so don't even bother with this
# test. # test.
if [target_info exists gdb,cannot_call_functions] { if [target_info exists gdb,cannot_call_functions] {
@ -48,12 +39,11 @@ if [target_info exists gdb,cannot_call_functions] {
} }
# Start with a fresh gdb. if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
untested $testfile.exp
return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off" gdb_test_no_output "set print address off"
gdb_test_no_output "set print symbol off" gdb_test_no_output "set print symbol off"

View File

@ -14,9 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set testfile "callexit" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested callexit.exp untested callexit.exp
@ -33,10 +31,7 @@ if [target_info exists gdb,cannot_call_functions] {
# Start with a fresh gdb. # Start with a fresh gdb.
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if { ![runto_main] } { if { ![runto_main] } {
fail "Can't run to main" fail "Can't run to main"

View File

@ -16,9 +16,7 @@
# This file was written by Fred Fish. (fnf@cygnus.com) # This file was written by Fred Fish. (fnf@cygnus.com)
# and modified by Bob Manson. (manson@cygnus.com) # and modified by Bob Manson. (manson@cygnus.com)
set testfile "callfuncs" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
set compile_flags {debug} set compile_flags {debug}
if [support_complex_tests] { if [support_complex_tests] {

View File

@ -24,9 +24,7 @@ if {[get_compiler_info]} {
return -1 return -1
} }
set testfile catch-load standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
untested catch-load.exp untested catch-load.exp
return -1 return -1
@ -34,7 +32,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
set testfile2 catch-load-so set testfile2 catch-load-so
set srcfile2 ${testfile2}.c set srcfile2 ${testfile2}.c
set binfile2 ${objdir}/${subdir}/${testfile2}.so set binfile2 [standard_output_file ${testfile2}.so]
set binfile2_dlopen [shlib_target_file ${testfile2}.so] set binfile2_dlopen [shlib_target_file ${testfile2}.so]
if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] != "" } { if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] != "" } {
untested catch-load.exp untested catch-load.exp

View File

@ -38,10 +38,7 @@ if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
continue continue
} }
global srcfile standard_testfile
set testfile "catch-syscall"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# All (but the last) syscalls from the example code # All (but the last) syscalls from the example code
# They are ordered according to the file, so do not change this. # They are ordered according to the file, so do not change this.

View File

@ -21,10 +21,9 @@
# Test GDB's character set support. # Test GDB's character set support.
set testfile "charset" standard_testfile .c charset-malloc.c
set srcfile ${testfile}.c
set srcmallocfile ${testfile}-malloc.c if { [prepare_for_testing ${testfile}.exp ${testfile} [list $srcfile $srcfile2]] } {
if { [prepare_for_testing ${testfile}.exp ${testfile} [list $srcfile $srcmallocfile]] } {
return -1 return -1
} }

View File

@ -25,9 +25,7 @@ if {![istarget "*-*-linux*"]} then {
} }
set testfile "checkpoint" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested checkpoint.exp untested checkpoint.exp
@ -36,10 +34,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
# Start with a fresh gdb # Start with a fresh gdb
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
global gdb_prompt global gdb_prompt

View File

@ -18,9 +18,7 @@
# Test that GDB cleans up properly after errors that result when a # Test that GDB cleans up properly after errors that result when a
# breakpoint is reset. # breakpoint is reset.
set testfile "chng-syms" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DVARIABLE=var1}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DVARIABLE=var1}] != "" } {
untested chng-syms.exp untested chng-syms.exp
@ -53,10 +51,7 @@ proc expect_to_stop_here { ident } {
return 1 return 1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test "break stop_here if (var1 == 42)" \ gdb_test "break stop_here if (var1 == 42)" \
"Breakpoint.*at.* file .*$srcfile, line.*" \ "Breakpoint.*at.* file .*$srcfile, line.*" \

View File

@ -22,19 +22,14 @@
# test running programs # test running programs
# #
set testfile "cvexpr" standard_testfile cvexpr.c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested code-expr.exp untested code-expr.exp
return -1 return -1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off" gdb_test_no_output "set print address off"

View File

@ -20,8 +20,8 @@ set testfile1 code_elim1
set testfile2 code_elim2 set testfile2 code_elim2
set srcfile1 ${testfile1}.c set srcfile1 ${testfile1}.c
set srcfile2 ${testfile2}.c set srcfile2 ${testfile2}.c
set binfile1 ${objdir}/${subdir}/${testfile1} set binfile1 [standard_output_file ${testfile1}]
set binfile2 ${objdir}/${subdir}/${testfile2} set binfile2 [standard_output_file ${testfile2}]
set opts [list debug] set opts [list debug]
lappend opts "additional_flags=-ffunction-sections" lappend opts "additional_flags=-ffunction-sections"
lappend opts "additional_flags=-fdata-sections" lappend opts "additional_flags=-fdata-sections"

View File

@ -17,6 +17,8 @@
# test special commands (if, while, etc) # test special commands (if, while, etc)
# #
standard_testfile
if { [prepare_for_testing commands.exp commands run.c {debug additional_flags=-DFAKEARGV}] } { if { [prepare_for_testing commands.exp commands run.c {debug additional_flags=-DFAKEARGV}] } {
return -1 return -1
} }
@ -555,7 +557,9 @@ proc stray_arg0_test { } {
# Test that GDB is able to source a file with an indented comment. # Test that GDB is able to source a file with an indented comment.
proc source_file_with_indented_comment {} { proc source_file_with_indented_comment {} {
set fd [open "file1" w] set file1 [standard_output_file file1]
set fd [open "$file1" w]
puts $fd \ puts $fd \
{define my_fun {define my_fun
#indented comment #indented comment
@ -563,40 +567,44 @@ end
echo Done!\n} echo Done!\n}
close $fd close $fd
gdb_test "source file1" "Done!" "source file with indented comment" gdb_test "source $file1" "Done!" "source file with indented comment"
} }
# Test that GDB can handle arguments when sourcing files recursively. # Test that GDB can handle arguments when sourcing files recursively.
# If the arguments are overwritten with ####### then the test has failed. # If the arguments are overwritten with ####### then the test has failed.
proc recursive_source_test {} { proc recursive_source_test {} {
set fd [open "file1" w] set file1 [standard_output_file file1]
set file2 [standard_output_file file2]
set file3 [standard_output_file file3]
set fd [open "$file1" w]
puts $fd \ puts $fd \
{source file2 "source $file2
abcdef qwerty} abcdef qwerty"
close $fd close $fd
set fd [open "file2" w] set fd [open "$file2" w]
puts $fd \ puts $fd \
{define abcdef "define abcdef
echo 1: <<<$arg0>>>\n echo 1: <<<\$arg0>>>\\n
source file3 source $file3
echo 2: <<<$arg0>>>\n echo 2: <<<\$arg0>>>\\n
end} end"
close $fd close $fd
set fd [open "file3" w] set fd [open "$file3" w]
puts $fd \ puts $fd \
"echo in file3\\n "echo in file3\\n
#################################################################" #################################################################"
close $fd close $fd
gdb_test "source file1" \ gdb_test "source $file1" \
"1: <<<qwerty>>>\[\r\n]+in file3\[\r\n]+2: <<<qwerty>>>" \ "1: <<<qwerty>>>\[\r\n]+in file3\[\r\n]+2: <<<qwerty>>>" \
"recursive source test" "recursive source test"
file delete file1 file delete $file1
file delete file2 file delete $file2
file delete file3 file delete $file3
} }
proc gdb_test_no_prompt { command result msg } { proc gdb_test_no_prompt { command result msg } {

View File

@ -50,35 +50,17 @@
# test running programs # test running programs
# #
set testfile "break" standard_testfile break.c break1.c
set srcfile ${testfile}.c
set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
untested completion.exp
return -1
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
untested completion.exp
return -1
}
if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
untested completion.exp
return -1
}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
} }
gdb_exit if {[prepare_for_testing $testfile.exp $testfile \
[list $srcfile $srcfile2] {debug nowarnings}]} {
gdb_start untested $testfile.exp
gdb_reinitialize_dir $srcdir/$subdir return -1
gdb_load ${binfile} }
if ![runto_main] then { if ![runto_main] then {
perror "tests suppressed" perror "tests suppressed"

View File

@ -14,28 +14,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set testfile complex standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
set options debug
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options] != "" } {
# No support for __complex__, presumably.
unsupported "print complex packed value in C"
unsupported "print complex value in C"
return 0
}
# Start with a fresh gdb.
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
} }
gdb_exit if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
gdb_start untested $testfile.exp
gdb_reinitialize_dir $srcdir/$subdir return -1
gdb_load $binfile }
if [runto f2] then { if [runto f2] then {
get_debug_format get_debug_format

View File

@ -31,19 +31,15 @@
# haven't tried to compile one, or the compilation failed for some reason. # haven't tried to compile one, or the compilation failed for some reason.
# In either case, just notify the user and skip the tests in this file. # In either case, just notify the user and skip the tests in this file.
set testfile "int-type" standard_testfile int-type.c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
untested cond-expr.exp untested cond-expr.exp
return -1 return -1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {

View File

@ -21,46 +21,30 @@
# test running programs # test running programs
# #
set testfile "break" standard_testfile break.c break1.c
set srcfile ${testfile}.c
set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } { if {[prepare_for_testing ${testfile}.exp $testfile [list $srcfile $srcfile2] \
untested condbreak.exp {debug nowarnings}]} {
return -1 return -1
}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
untested condbreak.exp
return -1
}
if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
untested condbreak.exp
return -1
} }
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location6 [gdb_get_line_number "set breakpoint 6 here"] set bp_location6 [gdb_get_line_number "set breakpoint 6 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile2]
set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1] set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile2]
set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1] set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile2]
set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1] set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2]
set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1] set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2]
set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1] set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile2]
set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1] set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2]
set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1] set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile2]
# #
# test break at function # test break at function
@ -73,7 +57,7 @@ gdb_test "break main" \
# test conditional break at function # test conditional break at function
# #
gdb_test "break marker1 if 1==1" \ gdb_test "break marker1 if 1==1" \
"Breakpoint.*at.* file .*$srcfile1, line.*" "Breakpoint.*at.* file .*$srcfile2, line.*"
gdb_test_no_output "delete 2" gdb_test_no_output "delete 2"
@ -89,7 +73,7 @@ gdb_test_no_output "delete 3"
# test conditional break at function # test conditional break at function
# #
gdb_test "break marker1 if (1==1)" \ gdb_test "break marker1 if (1==1)" \
"Breakpoint.*at.* file .*$srcfile1, line.*" "Breakpoint.*at.* file .*$srcfile2, line.*"
# #
# test conditional break at line number # test conditional break at line number
@ -98,16 +82,16 @@ gdb_test "break $srcfile:$bp_location1 if (1==1)" \
"Breakpoint.*at.* file .*$srcfile, line $bp_location1\\." "Breakpoint.*at.* file .*$srcfile, line $bp_location1\\."
gdb_test "break marker2 if (a==43)" \ gdb_test "break marker2 if (a==43)" \
"Breakpoint.*at.* file .*$srcfile1, line.*" "Breakpoint.*at.* file .*$srcfile2, line.*"
# #
# Check break involving inferior function call. # Check break involving inferior function call.
# Ensure there is at least one additional breakpoint with higher VMA. # Ensure there is at least one additional breakpoint with higher VMA.
# #
gdb_test "break marker3 if (multi_line_if_conditional(1,1,1)==0)" \ gdb_test "break marker3 if (multi_line_if_conditional(1,1,1)==0)" \
"Breakpoint.*at.* file .*$srcfile1, line.*" "Breakpoint.*at.* file .*$srcfile2, line.*"
gdb_test "break marker4" \ gdb_test "break marker4" \
"Breakpoint.*at.* file .*$srcfile1, line.*" "Breakpoint.*at.* file .*$srcfile2, line.*"
# #
# check to see what breakpoints are set # check to see what breakpoints are set
@ -129,15 +113,15 @@ if {$hp_aCC_compiler} {
gdb_test "info break" \ gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.* "Num Type\[ \]+Disp Enb Address\[ \]+What.*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile1:($bp_location15|$bp_location16).* \[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile2:($bp_location15|$bp_location16).*
\[\t \]+stop only if \\(1==1\\).* \[\t \]+stop only if \\(1==1\\).*
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
\[\t \]+stop only if \\(1==1\\).* \[\t \]+stop only if \\(1==1\\).*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile1:($bp_location8|$bp_location9).* \[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile2:($bp_location8|$bp_location9).*
\[\t \]+stop only if \\(a==43\\).* \[\t \]+stop only if \\(a==43\\).*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile1:($bp_location17|$bp_location18).* \[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile2:($bp_location17|$bp_location18).*
\[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).* \[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).*
\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile1:($bp_location13|$bp_location14).*" \ \[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile2:($bp_location13|$bp_location14).*" \
"breakpoint info" "breakpoint info"
@ -195,10 +179,10 @@ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=.
# #
# Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior. # Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior.
gdb_test_multiple "continue" "run until breakpoint at marker1" { gdb_test_multiple "continue" "run until breakpoint at marker1" {
-re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
pass "run until breakpoint at marker1" pass "run until breakpoint at marker1"
} }
-re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile1:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" {
xfail "run until breakpoint at marker1" xfail "run until breakpoint at marker1"
} }
} }
@ -207,10 +191,10 @@ gdb_test_multiple "continue" "run until breakpoint at marker1" {
# Same issues here as above. # Same issues here as above.
setup_xfail hppa2.0w-*-* 11512CLLbs setup_xfail hppa2.0w-*-* 11512CLLbs
gdb_test_multiple "continue" "run until breakpoint at marker2" { gdb_test_multiple "continue" "run until breakpoint at marker2" {
-re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
pass "run until breakpoint at marker2" pass "run until breakpoint at marker2"
} }
-re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" {
xfail "run until breakpoint at marker2" xfail "run until breakpoint at marker2"
} }
} }
@ -244,20 +228,20 @@ gdb_test "break *main if (1==1) ta 999" \
set test "run until breakpoint at marker3" set test "run until breakpoint at marker3"
gdb_test_multiple "continue" $test { gdb_test_multiple "continue" $test {
-re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
pass $test pass $test
} }
-re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile1:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" {
xfail $test xfail $test
} }
} }
set test "run until breakpoint at marker4" set test "run until breakpoint at marker4"
gdb_test_multiple "continue" $test { gdb_test_multiple "continue" $test {
-re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
pass $test pass $test
} }
-re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile1:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" {
xfail $test xfail $test
} }
} }

View File

@ -20,23 +20,16 @@
# #
set testfile "consecutive" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
untested consecutive.exp
return -1
}
if [get_compiler_info] { if [get_compiler_info] {
return -1 return -1
} }
gdb_exit if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
gdb_start untested $testfile.exp
gdb_reinitialize_dir $srcdir/$subdir return -1
gdb_load ${binfile} }
if ![runto_main] then { if ![runto_main] then {
perror "couldn't run to breakpoint" perror "couldn't run to breakpoint"

View File

@ -27,9 +27,7 @@
# test running programs # test running programs
# #
set testfile "constvars" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Create and source the file that provides information about the compiler # Create and source the file that provides information about the compiler
# used to compile the test case. # used to compile the test case.
@ -42,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug
return -1 return -1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# #

View File

@ -21,13 +21,7 @@ if ![isnative] then {
return return
} }
set testfile "coremaker" standard_testfile coremaker.c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested corefile.exp
return -1
}
# Create and source the file that provides information about the compiler # Create and source the file that provides information about the compiler
# used to compile the test case. # used to compile the test case.
@ -35,6 +29,11 @@ if [get_compiler_info] {
return -1 return -1
} }
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
untested $testfile.exp
return -1
}
set corefile [core_find $binfile {coremmap.data}] set corefile [core_find $binfile {coremmap.data}]
if {$corefile == ""} { if {$corefile == ""} {
return 0 return 0
@ -49,7 +48,7 @@ if {$corefile == ""} {
# #
# Another problem is that on some systems (solaris for example), there # Another problem is that on some systems (solaris for example), there
# is apparently a limit on the length of a fully specified path to # is apparently a limit on the length of a fully specified path to
# the coremaker executable, at about 80 chars. For this case, consider # the corefile executable, at about 80 chars. For this case, consider
# it a pass, but note that the program name is bad. # it a pass, but note that the program name is bad.
gdb_exit gdb_exit
@ -65,7 +64,7 @@ expect {
-re "Couldn't find .* registers in core file.*$gdb_prompt $" { -re "Couldn't find .* registers in core file.*$gdb_prompt $" {
fail "args: -core=[file tail $corefile] (couldn't find regs)" fail "args: -core=[file tail $corefile] (couldn't find regs)"
} }
-re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { -re "Core was generated by .*corefile.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
pass "args: -core=[file tail $corefile]" pass "args: -core=[file tail $corefile]"
} }
-re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { -re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
@ -93,7 +92,7 @@ if $verbose>1 then {
eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile" eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile"
expect { expect {
-re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { -re "Core was generated by .*corefile.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
pass "args: execfile -core=[file tail $corefile]" pass "args: execfile -core=[file tail $corefile]"
} }
-re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { -re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
@ -124,7 +123,7 @@ gdb_test_multiple "core-file $corefile" "core-file command" {
send_gdb "y\n" send_gdb "y\n"
exp_continue exp_continue
} }
-re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { -re "Core was generated by .*corefile.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
pass "core-file command" pass "core-file command"
} }
-re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { -re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {

View File

@ -30,8 +30,8 @@ set executable ctxobj-m
set libsrc [list "${srcdir}/${subdir}/ctxobj-v.c" \ set libsrc [list "${srcdir}/${subdir}/ctxobj-v.c" \
"${srcdir}/${subdir}/ctxobj-f.c"] "${srcdir}/${subdir}/ctxobj-f.c"]
set libobj1 "${objdir}/${subdir}/libctxobj1.so" set libobj1 [standard_output_file libctxobj1.so]
set libobj2 "${objdir}/${subdir}/libctxobj2.so" set libobj2 [standard_output_file libctxobj2.so]
set libobj1_opts { debug additional_flags=-fPIC set libobj1_opts { debug additional_flags=-fPIC
additional_flags=-DVERSION=104 additional_flags=-DVERSION=104
@ -47,7 +47,7 @@ if { [gdb_compile_shlib $libsrc $libobj2 $libobj2_opts ] != "" } {
return -1 return -1
} }
if { [gdb_compile "${srcdir}/${subdir}/${executable}.c" \ if { [gdb_compile "${srcdir}/${subdir}/${executable}.c" \
"${objdir}/${subdir}/${executable}" \ [standard_output_file ${executable}] \
executable \ executable \
[list debug shlib=${libobj1} shlib=${libobj2}]] [list debug shlib=${libobj1} shlib=${libobj2}]]
!= ""} { != ""} {

View File

@ -14,9 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
set testfile "cursal" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} { if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
untested "Couldn't compile $srcfile" untested "Couldn't compile $srcfile"

View File

@ -22,19 +22,14 @@
# test running programs # test running programs
# #
set testfile "cvexpr" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested cvexpr.exp untested cvexpr.exp
return -1 return -1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
gdb_test_no_output "set print sevenbit-strings" gdb_test_no_output "set print sevenbit-strings"
gdb_test_no_output "set print address off" gdb_test_no_output "set print address off"

View File

@ -14,28 +14,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. */ # along with this program. If not, see <http://www.gnu.org/licenses/>. */
set testfile1 "average" standard_testfile average.c sum.c
set testfile2 "sum"
set testfile "dbx-test"
set binfile1 ${objdir}/${subdir}/${testfile1}
set binfile2 ${objdir}/${subdir}/${testfile2}
set binfile ${objdir}/${subdir}/${testfile}
if {[build_executable $testfile.exp $testfile \
[list $srcfile $srcfile2] debug] == -1} {
if { [gdb_compile "${srcdir}/${subdir}/average.c" "${binfile1}.o" object {debug}] != "" } { untested $testfile.exp
untested dbx.exp return -1
return -1
}
if { [gdb_compile "${srcdir}/${subdir}/sum.c" "${binfile2}.o" object {debug}] != "" } {
untested dbx.exp
return -1
}
if { [gdb_compile "${binfile1}.o ${binfile2}.o" ${binfile} executable {debug}] != "" } {
untested dbx.exp
return -1
} }
# #

View File

@ -521,6 +521,9 @@ gdb_test "set height" "Argument required .integer to set it to.*" "set height"
gdb_test_no_output "set history expansion" "set history expansion" gdb_test_no_output "set history expansion" "set history expansion"
#test set history filename #test set history filename
gdb_test "set history filename" "Argument required .filename to set it to.*" "set history filename" gdb_test "set history filename" "Argument required .filename to set it to.*" "set history filename"
# Make sure the history ends up in the right place.
gdb_test_no_output "set history filename [standard_output_file .gdb_history]" \
"set the history filename"
#test set history save #test set history save
gdb_test_no_output "set history save" "set history save" gdb_test_no_output "set history save" "set history save"
#test set history size #test set history size

View File

@ -20,31 +20,13 @@
# test running programs # test running programs
# #
set testfile "break" standard_testfile break.c break1.c
set srcfile ${testfile}.c
set srcfile1 ${testfile}1.c
set binfile ${objdir}/${subdir}/${testfile}
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } { if {[prepare_for_testing ${testfile}.exp ${testfile} \
untested define.exp [list $srcfile $srcfile2] {debug nowarnings}]} {
return -1 return -1
} }
if { [gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile}1.o" object {debug nowarnings}] != "" } {
untested define.exp
return -1
}
if { [gdb_compile "${binfile}0.o ${binfile}1.o" "${binfile}" executable {debug nowarnings}] != "" } {
untested define.exp
return -1
}
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
set bp_location11 [gdb_get_line_number "set breakpoint 11 here"] set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]

View File

@ -17,21 +17,13 @@
# shortcuts of the "delete" command never stop working. # shortcuts of the "delete" command never stop working.
set testfile del standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile} if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { untested $testfile.exp
untested "Couldn't compile test program"
return -1 return -1
} }
# Get things started.
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# A function to test that ALIAS is working as a shortcut of the "delete" # A function to test that ALIAS is working as a shortcut of the "delete"
# command. # command.

View File

@ -27,10 +27,8 @@ if [is_remote target] then {
return 0 return 0
} }
set testfile "attach" standard_testfile attach.c
set srcfile ${testfile}.c set escapedbinfile [string_to_regexp ${binfile}]
set binfile ${objdir}/${subdir}/${testfile}
set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested detach.exp untested detach.exp

View File

@ -18,9 +18,7 @@
# This file is part of the gdb testsuite. It is intended to test that # This file is part of the gdb testsuite. It is intended to test that
# gdb could correctly handle decimal floating point introduced in IEEE 754R. # gdb could correctly handle decimal floating point introduced in IEEE 754R.
set testfile "dfp-test" standard_testfile .c
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
# Try to compile the test case. If we can't, assume the # Try to compile the test case. If we can't, assume the
# toolchain does not yet provide DFP support and bail out. # toolchain does not yet provide DFP support and bail out.
@ -29,10 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie
return -1 return -1
} }
gdb_exit clean_restart ${binfile}
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
if ![runto_main] then { if ![runto_main] then {
perror "couldn't run to breakpoint" perror "couldn't run to breakpoint"

View File

@ -16,13 +16,10 @@
# display.exp Test display commands # display.exp Test display commands
# Also do some printing stuff for coverage's sake. # Also do some printing stuff for coverage's sake.
# #
set testfile display standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
if {[prepare_for_testing $testfile.exp $testfile $srcfile \
{debug nowarnings}]} {
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
untested display.exp untested display.exp
return -1 return -1
} }
@ -36,11 +33,6 @@ verbose "Timeout is now $timeout seconds" 2
# use this to debug: # use this to debug:
#log_user 1 #log_user 1
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
# Some coverage stuff # Some coverage stuff
# #
if !$use_gdb_stub { if !$use_gdb_stub {

View File

@ -21,16 +21,18 @@ set testfile dmsym_main
# This is why we use gdb_compile instead of relying on the usual # This is why we use gdb_compile instead of relying on the usual
# call to prepare_for_testing. # call to prepare_for_testing.
set dmsym_o [standard_output_file dmsym.o]
if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \ if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \
${objdir}/${subdir}/dmsym.o \ $dmsym_o \
object {}] != ""} { object {}] != ""} {
untested dmsym.exp untested dmsym.exp
return -1 return -1
} }
if {[gdb_compile \ if {[gdb_compile \
[list ${srcdir}/${subdir}/dmsym_main.c ${objdir}/${subdir}/dmsym.o] \ [list ${srcdir}/${subdir}/dmsym_main.c $dmsym_o] \
${objdir}/${subdir}/${testfile} \ [standard_output_file ${testfile}] \
executable {debug}] != ""} { executable {debug}] != ""} {
untested dmsym.exp untested dmsym.exp
return -1 return -1

View File

@ -17,10 +17,8 @@
# This is a test for the gdb command "dump". # This is a test for the gdb command "dump".
set testfile "dump" standard_testfile
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
set options {debug} set options {debug}
set is64bitonly "no" set is64bitonly "no"

View File

@ -33,11 +33,9 @@ if {![istarget *-*-linux*]
return 0 return 0
} }
set testfile dup-sect standard_testfile .S
set srcfile ${testfile}.S
set srcmainfile start.c set srcmainfile start.c
set executable ${testfile} set executable ${testfile}
set binfile ${objdir}/${subdir}/${executable}
if {[build_executable ${testfile}.exp $executable [list ${srcfile} ${srcmainfile}] {}] == -1} { if {[build_executable ${testfile}.exp $executable [list ${srcfile} ${srcmainfile}] {}] == -1} {
return -1 return -1