mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
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:
parent
a64d25307d
commit
f76495c88c
@ -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>
|
||||
|
||||
* a2-run.exp, all-bin.exp, annota1.exp, annota3.exp, anon.exp,
|
||||
|
@ -17,28 +17,13 @@
|
||||
|
||||
|
||||
|
||||
set testfile "call-ar-st"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
# Test depends on printf, which the sparclet stub doesn't support.
|
||||
if { [istarget "sparclet-*-*"] } {
|
||||
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
|
||||
# test.
|
||||
if [target_info exists gdb,cannot_call_functions] {
|
||||
@ -47,15 +32,22 @@ if [target_info exists gdb,cannot_call_functions] {
|
||||
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 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 address off"
|
||||
gdb_test_no_output "set width 0"
|
||||
|
@ -21,10 +21,7 @@
|
||||
|
||||
|
||||
|
||||
set testfile "call-rt-st"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
standard_testfile .c
|
||||
|
||||
# Test depends on printf, which the sparclet stub doesn't support.
|
||||
if { [istarget "sparclet-*-*"] } {
|
||||
@ -55,10 +52,7 @@ if [target_info exists gdb,cannot_call_functions] {
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
gdb_test_no_output "set print address off"
|
||||
gdb_test_no_output "set width 0"
|
||||
|
@ -28,9 +28,7 @@ if [target_info exists gdb,cannot_call_functions] {
|
||||
continue
|
||||
}
|
||||
|
||||
set testfile "call-sc"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
# Create and source the file that provides information about the
|
||||
# compiler used to compile the test case.
|
||||
@ -47,7 +45,6 @@ proc start_scalars_test { type } {
|
||||
global testfile
|
||||
global srcfile
|
||||
global binfile
|
||||
global objdir
|
||||
global subdir
|
||||
global srcdir
|
||||
global gdb_prompt
|
||||
@ -57,7 +54,7 @@ proc start_scalars_test { type } {
|
||||
set flags "debug additional_flags=-DT=${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}"] != "" } {
|
||||
# built the second test case since we can't use prototypes
|
||||
warning "Prototypes not supported, rebuilding with -DNO_PROTOTYPES"
|
||||
|
@ -31,9 +31,7 @@ if [target_info exists gdb,nosignals] {
|
||||
}
|
||||
|
||||
|
||||
set testfile "call-signals"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile call-signals.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested call-signal-resume.exp
|
||||
@ -61,10 +59,7 @@ proc get_dummy_frame_number { } {
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto_main] } {
|
||||
fail "Can't run to main"
|
||||
|
@ -23,22 +23,13 @@
|
||||
#debug strarg
|
||||
|
||||
|
||||
set testfile "call-strs"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
# Test depends on printf, which the sparclet stub doesn't support.
|
||||
if { [istarget "sparclet-*-*"] } {
|
||||
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
|
||||
# test.
|
||||
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 address off"
|
||||
gdb_test_no_output "set print symbol off"
|
||||
|
@ -14,9 +14,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
set testfile "callexit"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested callexit.exp
|
||||
@ -33,10 +31,7 @@ if [target_info exists gdb,cannot_call_functions] {
|
||||
|
||||
# Start with a fresh gdb.
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if { ![runto_main] } {
|
||||
fail "Can't run to main"
|
||||
|
@ -16,9 +16,7 @@
|
||||
# This file was written by Fred Fish. (fnf@cygnus.com)
|
||||
# and modified by Bob Manson. (manson@cygnus.com)
|
||||
|
||||
set testfile "callfuncs"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
set compile_flags {debug}
|
||||
if [support_complex_tests] {
|
||||
|
@ -24,9 +24,7 @@ if {[get_compiler_info]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
set testfile catch-load
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug shlib_load}] != "" } {
|
||||
untested catch-load.exp
|
||||
return -1
|
||||
@ -34,7 +32,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
|
||||
set testfile2 catch-load-so
|
||||
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]
|
||||
if { [gdb_compile_shlib "${srcdir}/${subdir}/${srcfile2}" ${binfile2} {debug}] != "" } {
|
||||
untested catch-load.exp
|
||||
|
@ -38,10 +38,7 @@ if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"]
|
||||
continue
|
||||
}
|
||||
|
||||
global srcfile
|
||||
set testfile "catch-syscall"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
# All (but the last) syscalls from the example code
|
||||
# They are ordered according to the file, so do not change this.
|
||||
|
@ -21,10 +21,9 @@
|
||||
# Test GDB's character set support.
|
||||
|
||||
|
||||
set testfile "charset"
|
||||
set srcfile ${testfile}.c
|
||||
set srcmallocfile ${testfile}-malloc.c
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} [list $srcfile $srcmallocfile]] } {
|
||||
standard_testfile .c charset-malloc.c
|
||||
|
||||
if { [prepare_for_testing ${testfile}.exp ${testfile} [list $srcfile $srcfile2]] } {
|
||||
return -1
|
||||
}
|
||||
|
||||
|
@ -25,9 +25,7 @@ if {![istarget "*-*-linux*"]} then {
|
||||
}
|
||||
|
||||
|
||||
set testfile "checkpoint"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested checkpoint.exp
|
||||
@ -36,10 +34,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
|
||||
|
||||
# Start with a fresh gdb
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
global gdb_prompt
|
||||
|
||||
|
@ -18,9 +18,7 @@
|
||||
# Test that GDB cleans up properly after errors that result when a
|
||||
# breakpoint is reset.
|
||||
|
||||
set testfile "chng-syms"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DVARIABLE=var1}] != "" } {
|
||||
untested chng-syms.exp
|
||||
@ -53,10 +51,7 @@ proc expect_to_stop_here { ident } {
|
||||
return 1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test "break stop_here if (var1 == 42)" \
|
||||
"Breakpoint.*at.* file .*$srcfile, line.*" \
|
||||
|
@ -22,19 +22,14 @@
|
||||
# test running programs
|
||||
#
|
||||
|
||||
set testfile "cvexpr"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile cvexpr.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested code-expr.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
gdb_test_no_output "set print address off"
|
||||
|
@ -20,8 +20,8 @@ set testfile1 code_elim1
|
||||
set testfile2 code_elim2
|
||||
set srcfile1 ${testfile1}.c
|
||||
set srcfile2 ${testfile2}.c
|
||||
set binfile1 ${objdir}/${subdir}/${testfile1}
|
||||
set binfile2 ${objdir}/${subdir}/${testfile2}
|
||||
set binfile1 [standard_output_file ${testfile1}]
|
||||
set binfile2 [standard_output_file ${testfile2}]
|
||||
set opts [list debug]
|
||||
lappend opts "additional_flags=-ffunction-sections"
|
||||
lappend opts "additional_flags=-fdata-sections"
|
||||
|
@ -17,6 +17,8 @@
|
||||
# test special commands (if, while, etc)
|
||||
#
|
||||
|
||||
standard_testfile
|
||||
|
||||
if { [prepare_for_testing commands.exp commands run.c {debug additional_flags=-DFAKEARGV}] } {
|
||||
return -1
|
||||
}
|
||||
@ -555,7 +557,9 @@ proc stray_arg0_test { } {
|
||||
|
||||
# Test that GDB is able to source a file with an 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 \
|
||||
{define my_fun
|
||||
#indented comment
|
||||
@ -563,40 +567,44 @@ end
|
||||
echo Done!\n}
|
||||
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.
|
||||
# If the arguments are overwritten with ####### then the test has failed.
|
||||
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 \
|
||||
{source file2
|
||||
abcdef qwerty}
|
||||
"source $file2
|
||||
abcdef qwerty"
|
||||
close $fd
|
||||
|
||||
set fd [open "file2" w]
|
||||
set fd [open "$file2" w]
|
||||
puts $fd \
|
||||
{define abcdef
|
||||
echo 1: <<<$arg0>>>\n
|
||||
source file3
|
||||
echo 2: <<<$arg0>>>\n
|
||||
end}
|
||||
"define abcdef
|
||||
echo 1: <<<\$arg0>>>\\n
|
||||
source $file3
|
||||
echo 2: <<<\$arg0>>>\\n
|
||||
end"
|
||||
close $fd
|
||||
|
||||
set fd [open "file3" w]
|
||||
set fd [open "$file3" w]
|
||||
puts $fd \
|
||||
"echo in file3\\n
|
||||
#################################################################"
|
||||
close $fd
|
||||
|
||||
gdb_test "source file1" \
|
||||
gdb_test "source $file1" \
|
||||
"1: <<<qwerty>>>\[\r\n]+in file3\[\r\n]+2: <<<qwerty>>>" \
|
||||
"recursive source test"
|
||||
|
||||
file delete file1
|
||||
file delete file2
|
||||
file delete file3
|
||||
file delete $file1
|
||||
file delete $file2
|
||||
file delete $file3
|
||||
}
|
||||
|
||||
proc gdb_test_no_prompt { command result msg } {
|
||||
|
@ -50,35 +50,17 @@
|
||||
# test running programs
|
||||
#
|
||||
|
||||
set testfile "break"
|
||||
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
|
||||
}
|
||||
standard_testfile break.c break1.c
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
if {[prepare_for_testing $testfile.exp $testfile \
|
||||
[list $srcfile $srcfile2] {debug nowarnings}]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
if ![runto_main] then {
|
||||
perror "tests suppressed"
|
||||
|
@ -14,28 +14,16 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
set testfile complex
|
||||
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.
|
||||
standard_testfile
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load $binfile
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
if [runto f2] then {
|
||||
get_debug_format
|
||||
|
@ -31,19 +31,15 @@
|
||||
# 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.
|
||||
|
||||
set testfile "int-type"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile int-type.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
|
||||
untested cond-expr.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
|
||||
if ![runto_main] then {
|
||||
|
@ -21,46 +21,30 @@
|
||||
# test running programs
|
||||
#
|
||||
|
||||
set testfile "break"
|
||||
set srcfile ${testfile}.c
|
||||
set srcfile1 ${testfile}1.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile break.c break1.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
|
||||
untested condbreak.exp
|
||||
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 {[prepare_for_testing ${testfile}.exp $testfile [list $srcfile $srcfile2] \
|
||||
{debug nowarnings}]} {
|
||||
return -1
|
||||
}
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
|
||||
set bp_location1 [gdb_get_line_number "set breakpoint 1 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_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
|
||||
set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
|
||||
set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
|
||||
set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
|
||||
set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
|
||||
set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
|
||||
set bp_location18 [gdb_get_line_number "set breakpoint 18 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" $srcfile2]
|
||||
set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile2]
|
||||
set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2]
|
||||
set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2]
|
||||
set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile2]
|
||||
set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2]
|
||||
set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile2]
|
||||
|
||||
#
|
||||
# test break at function
|
||||
@ -73,7 +57,7 @@ gdb_test "break main" \
|
||||
# test conditional break at function
|
||||
#
|
||||
gdb_test "break marker1 if 1==1" \
|
||||
"Breakpoint.*at.* file .*$srcfile1, line.*"
|
||||
"Breakpoint.*at.* file .*$srcfile2, line.*"
|
||||
|
||||
gdb_test_no_output "delete 2"
|
||||
|
||||
@ -89,7 +73,7 @@ gdb_test_no_output "delete 3"
|
||||
# test conditional break at function
|
||||
#
|
||||
gdb_test "break marker1 if (1==1)" \
|
||||
"Breakpoint.*at.* file .*$srcfile1, line.*"
|
||||
"Breakpoint.*at.* file .*$srcfile2, line.*"
|
||||
|
||||
#
|
||||
# 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\\."
|
||||
|
||||
gdb_test "break marker2 if (a==43)" \
|
||||
"Breakpoint.*at.* file .*$srcfile1, line.*"
|
||||
"Breakpoint.*at.* file .*$srcfile2, line.*"
|
||||
|
||||
#
|
||||
# Check break involving inferior function call.
|
||||
# Ensure there is at least one additional breakpoint with higher VMA.
|
||||
#
|
||||
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" \
|
||||
"Breakpoint.*at.* file .*$srcfile1, line.*"
|
||||
"Breakpoint.*at.* file .*$srcfile2, line.*"
|
||||
|
||||
#
|
||||
# check to see what breakpoints are set
|
||||
@ -129,15 +113,15 @@ if {$hp_aCC_compiler} {
|
||||
gdb_test "info break" \
|
||||
"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 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\\).*
|
||||
\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.*
|
||||
\[\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\\).*
|
||||
\[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\\).*
|
||||
\[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"
|
||||
|
||||
|
||||
@ -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.
|
||||
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"
|
||||
}
|
||||
-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"
|
||||
}
|
||||
}
|
||||
@ -207,10 +191,10 @@ gdb_test_multiple "continue" "run until breakpoint at marker1" {
|
||||
# Same issues here as above.
|
||||
setup_xfail hppa2.0w-*-* 11512CLLbs
|
||||
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"
|
||||
}
|
||||
-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"
|
||||
}
|
||||
}
|
||||
@ -244,20 +228,20 @@ gdb_test "break *main if (1==1) ta 999" \
|
||||
|
||||
set test "run until breakpoint at marker3"
|
||||
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
|
||||
}
|
||||
-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
|
||||
}
|
||||
}
|
||||
|
||||
set test "run until breakpoint at marker4"
|
||||
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
|
||||
}
|
||||
-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
|
||||
}
|
||||
}
|
||||
|
@ -20,23 +20,16 @@
|
||||
#
|
||||
|
||||
|
||||
set testfile "consecutive"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
|
||||
untested consecutive.exp
|
||||
return -1
|
||||
}
|
||||
standard_testfile
|
||||
|
||||
if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
if ![runto_main] then {
|
||||
perror "couldn't run to breakpoint"
|
||||
|
@ -27,9 +27,7 @@
|
||||
# test running programs
|
||||
#
|
||||
|
||||
set testfile "constvars"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
# Create and source the file that provides information about the compiler
|
||||
# used to compile the test case.
|
||||
@ -42,10 +40,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
|
||||
#
|
||||
|
@ -21,13 +21,7 @@ if ![isnative] then {
|
||||
return
|
||||
}
|
||||
|
||||
set testfile "coremaker"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested corefile.exp
|
||||
return -1
|
||||
}
|
||||
standard_testfile coremaker.c
|
||||
|
||||
# Create and source the file that provides information about the compiler
|
||||
# used to compile the test case.
|
||||
@ -35,6 +29,11 @@ if [get_compiler_info] {
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
set corefile [core_find $binfile {coremmap.data}]
|
||||
if {$corefile == ""} {
|
||||
return 0
|
||||
@ -49,7 +48,7 @@ if {$corefile == ""} {
|
||||
#
|
||||
# Another problem is that on some systems (solaris for example), there
|
||||
# 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.
|
||||
|
||||
gdb_exit
|
||||
@ -65,7 +64,7 @@ expect {
|
||||
-re "Couldn't find .* registers in core file.*$gdb_prompt $" {
|
||||
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]"
|
||||
}
|
||||
-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"
|
||||
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]"
|
||||
}
|
||||
-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"
|
||||
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"
|
||||
}
|
||||
-re "Core was generated by .*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" {
|
||||
|
@ -30,8 +30,8 @@ set executable ctxobj-m
|
||||
set libsrc [list "${srcdir}/${subdir}/ctxobj-v.c" \
|
||||
"${srcdir}/${subdir}/ctxobj-f.c"]
|
||||
|
||||
set libobj1 "${objdir}/${subdir}/libctxobj1.so"
|
||||
set libobj2 "${objdir}/${subdir}/libctxobj2.so"
|
||||
set libobj1 [standard_output_file libctxobj1.so]
|
||||
set libobj2 [standard_output_file libctxobj2.so]
|
||||
|
||||
set libobj1_opts { debug additional_flags=-fPIC
|
||||
additional_flags=-DVERSION=104
|
||||
@ -47,7 +47,7 @@ if { [gdb_compile_shlib $libsrc $libobj2 $libobj2_opts ] != "" } {
|
||||
return -1
|
||||
}
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${executable}.c" \
|
||||
"${objdir}/${subdir}/${executable}" \
|
||||
[standard_output_file ${executable}] \
|
||||
executable \
|
||||
[list debug shlib=${libobj1} shlib=${libobj2}]]
|
||||
!= ""} {
|
||||
|
@ -14,9 +14,7 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
set testfile "cursal"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
|
||||
untested "Couldn't compile $srcfile"
|
||||
|
@ -22,19 +22,14 @@
|
||||
# test running programs
|
||||
#
|
||||
|
||||
set testfile "cvexpr"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested cvexpr.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
gdb_test_no_output "set print sevenbit-strings"
|
||||
gdb_test_no_output "set print address off"
|
||||
|
@ -14,28 +14,12 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
set testfile1 "average"
|
||||
set testfile2 "sum"
|
||||
set testfile "dbx-test"
|
||||
set binfile1 ${objdir}/${subdir}/${testfile1}
|
||||
set binfile2 ${objdir}/${subdir}/${testfile2}
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile average.c sum.c
|
||||
|
||||
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/average.c" "${binfile1}.o" object {debug}] != "" } {
|
||||
untested dbx.exp
|
||||
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
|
||||
if {[build_executable $testfile.exp $testfile \
|
||||
[list $srcfile $srcfile2] debug] == -1} {
|
||||
untested $testfile.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -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"
|
||||
#test 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
|
||||
gdb_test_no_output "set history save" "set history save"
|
||||
#test set history size
|
||||
|
@ -20,31 +20,13 @@
|
||||
# test running programs
|
||||
#
|
||||
|
||||
set testfile "break"
|
||||
set srcfile ${testfile}.c
|
||||
set srcfile1 ${testfile}1.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile break.c break1.c
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debug nowarnings}] != "" } {
|
||||
untested define.exp
|
||||
return -1
|
||||
if {[prepare_for_testing ${testfile}.exp ${testfile} \
|
||||
[list $srcfile $srcfile2] {debug nowarnings}]} {
|
||||
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_location11 [gdb_get_line_number "set breakpoint 11 here"]
|
||||
|
||||
|
@ -17,21 +17,13 @@
|
||||
# shortcuts of the "delete" command never stop working.
|
||||
|
||||
|
||||
set testfile del
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested "Couldn't compile test program"
|
||||
standard_testfile
|
||||
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
||||
untested $testfile.exp
|
||||
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"
|
||||
# command.
|
||||
|
||||
|
@ -27,10 +27,8 @@ if [is_remote target] then {
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile "attach"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
set escapedbinfile [string_to_regexp ${objdir}/${subdir}/${testfile}]
|
||||
standard_testfile attach.c
|
||||
set escapedbinfile [string_to_regexp ${binfile}]
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
|
||||
untested detach.exp
|
||||
|
@ -18,9 +18,7 @@
|
||||
# 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.
|
||||
|
||||
set testfile "dfp-test"
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile .c
|
||||
|
||||
# Try to compile the test case. If we can't, assume the
|
||||
# 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
|
||||
}
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
clean_restart ${binfile}
|
||||
|
||||
if ![runto_main] then {
|
||||
perror "couldn't run to breakpoint"
|
||||
|
@ -16,13 +16,10 @@
|
||||
# display.exp Test display commands
|
||||
# Also do some printing stuff for coverage's sake.
|
||||
#
|
||||
set testfile display
|
||||
set srcfile ${testfile}.c
|
||||
set binfile ${objdir}/${subdir}/${testfile}
|
||||
standard_testfile
|
||||
|
||||
|
||||
|
||||
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
|
||||
if {[prepare_for_testing $testfile.exp $testfile $srcfile \
|
||||
{debug nowarnings}]} {
|
||||
untested display.exp
|
||||
return -1
|
||||
}
|
||||
@ -36,11 +33,6 @@ verbose "Timeout is now $timeout seconds" 2
|
||||
# use this to debug:
|
||||
#log_user 1
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
gdb_reinitialize_dir $srcdir/$subdir
|
||||
gdb_load ${binfile}
|
||||
|
||||
# Some coverage stuff
|
||||
#
|
||||
if !$use_gdb_stub {
|
||||
|
@ -21,16 +21,18 @@ set testfile dmsym_main
|
||||
# This is why we use gdb_compile instead of relying on the usual
|
||||
# call to prepare_for_testing.
|
||||
|
||||
set dmsym_o [standard_output_file dmsym.o]
|
||||
|
||||
if {[gdb_compile "${srcdir}/${subdir}/dmsym.c" \
|
||||
${objdir}/${subdir}/dmsym.o \
|
||||
$dmsym_o \
|
||||
object {}] != ""} {
|
||||
untested dmsym.exp
|
||||
return -1
|
||||
}
|
||||
|
||||
if {[gdb_compile \
|
||||
[list ${srcdir}/${subdir}/dmsym_main.c ${objdir}/${subdir}/dmsym.o] \
|
||||
${objdir}/${subdir}/${testfile} \
|
||||
[list ${srcdir}/${subdir}/dmsym_main.c $dmsym_o] \
|
||||
[standard_output_file ${testfile}] \
|
||||
executable {debug}] != ""} {
|
||||
untested dmsym.exp
|
||||
return -1
|
||||
|
@ -17,10 +17,8 @@
|
||||
# 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 is64bitonly "no"
|
||||
|
@ -33,11 +33,9 @@ if {![istarget *-*-linux*]
|
||||
return 0
|
||||
}
|
||||
|
||||
set testfile dup-sect
|
||||
set srcfile ${testfile}.S
|
||||
standard_testfile .S
|
||||
set srcmainfile start.c
|
||||
set executable ${testfile}
|
||||
set binfile ${objdir}/${subdir}/${executable}
|
||||
|
||||
if {[build_executable ${testfile}.exp $executable [list ${srcfile} ${srcmainfile}] {}] == -1} {
|
||||
return -1
|
||||
|
Loading…
Reference in New Issue
Block a user