diff options
author | Paul Gilliam <pgilliam@us.ibm.com> | 2005-04-28 23:21:22 +0000 |
---|---|---|
committer | Paul Gilliam <pgilliam@us.ibm.com> | 2005-04-28 23:21:22 +0000 |
commit | f07e55f031dad1c65dfe580853117375e50c3a56 (patch) | |
tree | b8713d8828c3b60e48319d44e143d17ac8956a4b | |
parent | 3cbba3d1cd84417dad72e719d1c7fc402c3941da (diff) | |
download | ppe42-binutils-f07e55f031dad1c65dfe580853117375e50c3a56.tar.gz ppe42-binutils-f07e55f031dad1c65dfe580853117375e50c3a56.zip |
2005-04-19 Paul Gilliam <pgilliam@us.ibm.com>
* gdb.base/shlib-call.exp: Change to use new shared library
infrastructure.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/shlib-call.exp | 81 |
2 files changed, 21 insertions, 65 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 51d7d75082..308a08c327 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2005-04-28 Paul Gilliam <pgilliam@us.ibm.com> + * gdb.base/shlib-call.exp: Change to use new shared library + infrastructure. + +2005-04-28 Paul Gilliam <pgilliam@us.ibm.com> + * gdb.base/pending.exp: Change to use new shared library infrastructure. diff --git a/gdb/testsuite/gdb.base/shlib-call.exp b/gdb/testsuite/gdb.base/shlib-call.exp index 26a6556464..49a6144199 100644 --- a/gdb/testsuite/gdb.base/shlib-call.exp +++ b/gdb/testsuite/gdb.base/shlib-call.exp @@ -45,78 +45,29 @@ if ![isnative] then { } set testfile "shmain" -set libfile "shr" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile} +set libfile1 "shr1" +set libfile2 "shr2" +set srcfile ${srcdir}/${subdir}/${testfile}.c +set lib1src ${srcdir}/${subdir}/${libfile1}.c +set lib2src ${srcdir}/${subdir}/${libfile2}.c +set lib1 ${objdir}/${subdir}/${libfile1}.sl +set lib2 ${objdir}/${subdir}/${libfile2}.sl +set binfile ${objdir}/${subdir}/${testfile} + +set lib_opts "debug" +set exec_opts [list debug shlib=${lib1} shlib=${lib2}] -# build the first test case if [get_compiler_info ${binfile}] { return -1 } -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - - -# Build the shared libraries this test case needs. -# - -if {$gcc_compiled == 0} { - if [istarget "hppa*-hp-hpux*"] then { - set additional_flags "additional_flags=+z" - } elseif { [istarget "mips-sgi-irix*"] } { - # Disable SGI compiler's implicit -Dsgi - set additional_flags "additional_flags=-Usgi" - } else { - # don't know what the compiler is... - set additional_flags "" - } -} else { - if { ([istarget "powerpc*-*-aix*"] - || [istarget "rs6000*-*-aix*"]) } { - set additional_flags "" - } else { - set additional_flags "additional_flags=-fpic" - } -} - -if {[gdb_compile "${srcdir}/${subdir}/${libfile}1.c" "${objdir}/${subdir}/${libfile}1.o" object [list debug $additional_flags]] != ""} { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -if {[gdb_compile "${srcdir}/${subdir}/${libfile}2.c" "${objdir}/${subdir}/${libfile}2.o" object [list debug $additional_flags]] != ""} { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." -} - -if [istarget "hppa*-*-hpux*"] { - remote_exec build "ld -b ${objdir}/${subdir}/${libfile}1.o -o ${objdir}/${subdir}/${libfile}1.sl" - remote_exec build "ld -b ${objdir}/${subdir}/${libfile}2.o -o ${objdir}/${subdir}/${libfile}2.sl" -} else { - set additional_flags "additional_flags=-shared" - if {[gdb_compile "${objdir}/${subdir}/${libfile}1.o" "${objdir}/${subdir}/${libfile}1.sl" executable [list debug $additional_flags]] != ""} { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." - } - if {[gdb_compile "${objdir}/${subdir}/${libfile}2.o" "${objdir}/${subdir}/${libfile}2.sl" executable [list debug $additional_flags]] != ""} { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." - } -} - -if { ($gcc_compiled - && ([istarget "powerpc*-*-aix*"] - || [istarget "rs6000*-*-aix*"] )) } { - set additional_flags "additional_flags=-L${objdir}/${subdir}" -} elseif { [istarget "mips-sgi-irix*"] } { - set additional_flags "additional_flags=-rpath ${objdir}/${subdir}" -} else { - set additional_flags "" -} -if {[gdb_compile "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}1.sl ${objdir}/${subdir}/${libfile}2.sl" "${binfile}" executable [list debug $additional_flags]] != ""} { - gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." +if { [gdb_compile_shlib ${lib1src} ${lib1} $lib_opts] != "" + || [gdb_compile_shlib ${lib2src} ${lib2} $lib_opts] != "" + || [gdb_compile ${srcfile} ${binfile} executable $exec_opts] != ""} { + untested "Could not compile $lib1, $lib2, or $srcfile." + return -1 } - - # Start with a fresh gdb. gdb_exit |