diff options
author | Bob Manson <manson@cygnus> | 1997-01-29 09:40:31 +0000 |
---|---|---|
committer | Bob Manson <manson@cygnus> | 1997-01-29 09:40:31 +0000 |
commit | 787f6220773d9174a9675dedd3bbfc8f070511a6 (patch) | |
tree | 64911c10d46bc93973cc825a730b4173b3367a49 /gdb/testsuite/gdb.base/langs.exp | |
parent | 1a2faf1f1e335ff32c1d8c5c7675cd7ce9055e33 (diff) | |
download | gdb-787f6220773d9174a9675dedd3bbfc8f070511a6.zip gdb-787f6220773d9174a9675dedd3bbfc8f070511a6.tar.gz gdb-787f6220773d9174a9675dedd3bbfc8f070511a6.tar.bz2 |
Major revision to testsuites for cross-testing and DOS testing support.
Diffstat (limited to 'gdb/testsuite/gdb.base/langs.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/langs.exp | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp index 8671e38..c9340f4 100644 --- a/gdb/testsuite/gdb.base/langs.exp +++ b/gdb/testsuite/gdb.base/langs.exp @@ -7,27 +7,21 @@ set bug_id 0 set testfile langs set binfile ${objdir}/${subdir}/${testfile} -if { [compile "${srcdir}/${subdir}/langs0.c -g -c -o ${binfile}0.o "] != "" } { - perror "Couldn't compile langs0.c to object" - return -1 -} -if { [compile "${srcdir}/${subdir}/langs1.c -g -c -o ${binfile}1.o "] != "" } { - perror "Couldn't compile langs1.c to object" - return -1 -} -if { [compile "${srcdir}/${subdir}/langs2.c -g -c -o ${binfile}2.o "] != "" } { - perror "Couldn't compile langs2.c to object" - return -1 + +if [is_remote host] { + remote_download host ${srcdir}/${subdir}/langs1.f + remote_download host ${srcdir}/${subdir}/langs2.cxx } -if { [compile "${binfile}0.o ${binfile}1.o ${binfile}2.o -o ${binfile}"] != "" } { + +if { [gdb_compile "${srcdir}/${subdir}/langs0.c ${srcdir}/${subdir}/langs1.c ${srcdir}/${subdir}/langs2.c" "${binfile}" executable {debug}] != "" } { perror "Couldn't link langs." return -1 } -execute_anywhere "rm -f ${binfile}.ci" -if { [compile "-E ${srcdir}/${subdir}/compiler.c > ${binfile}.ci"] != "" } { - perror "Couldn't make ${testfile}.ci file" - return -1 +# Create and source the file that provides information about the compiler +# used to compile the test case. +if [get_compiler_info ${binfile}] { + return -1; } gdb_exit @@ -35,8 +29,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load $binfile -source ${binfile}.ci - gdb_test "b langs0" {Function "langs0" not defined\.} \ "break on nonexistent function in langs.exp" @@ -85,8 +77,12 @@ if [runto csub] then { if $noresults==1 then { return } - gdb_test "cont" "Program exited normally\\." \ - "continue to exit in langs.exp" + if [target_info exists use_gdb_stub] { + gdb_test "cont" "Breakpoint .*exit.*" "continue to exit in langs.exp" + } else { + gdb_test "cont" "Program exited normally\\." \ + "continue to exit in langs.exp" + } } return 0 |