2005-04-29 Paul Gilliam <pgilliam@us.ibm.com>
authorPaul Gilliam <pgilliam@us.ibm.com>
Fri, 29 Apr 2005 21:08:24 +0000 (21:08 +0000)
committerPaul Gilliam <pgilliam@us.ibm.com>
Fri, 29 Apr 2005 21:08:24 +0000 (21:08 +0000)
        * gdb.base/unload.exp: Use new shared library infrastructure.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/unload.exp

index 6c93b2993d4ca539194beee570cf12ed979ea853..32c72811045f4858510005e32243b3cc1cf1f82b 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-29  Paul Gilliam  <pgilliam@us.ibm.com>
+
+       * gdb.base/unload.exp: Use new shared library infrastructure.
+
 2005-04-29  Paul Gilliam  <pgilliam@us.ibm.com>
 
        * gdb.base/so-impl-ld.exp: Use new shared library
index a0c04febe7fc7c05954e1df429b441a972ffa0ec..b852b1907f0ba10ccb51a51dd194b8aa3f620f0f 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 2003, 2004
+#   Copyright 2003, 2004, 2005
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -16,8 +16,6 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
 
 # This file was created by Jeff Johnston. (jjohnstn@redhat.com)
-# The shared library compilation portion was copied from shlib-call.exp which was
-# written by Elena Zannoni (ezannoni@redhat.com).
 
 if $tracelevel then {
     strace $tracelevel
@@ -37,13 +35,11 @@ if ![isnative] then {
 set testfile "unload"
 set libfile "unloadshr"
 set libsrcfile ${libfile}.c
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+set srcfile $srcdir/$subdir/$testfile.c
+set binfile $objdir/$subdir/$testfile
 set shlibdir ${objdir}/${subdir}
-
-if [get_compiler_info ${binfile}] {
-    return -1
-}
+set libsrc  $srcdir/$subdir/$libfile.c
+set lib_sl  $objdir/$subdir/$libfile.sl
 
 set dl_lib_flag ""
 switch -glob [istarget] {
@@ -53,44 +49,20 @@ switch -glob [istarget] {
     default          { }
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DSHLIB_DIR\=\"${shlibdir}\"" $dl_lib_flag]] != "" } {
-     gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-}
+set lib_opts debug
+set exec_opts [list debug $dl_lib_flag additional_flags=-DSHLIB_DIR\=\"${shlibdir}\"]
 
-# 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 [get_compiler_info ${binfile}] {
+    return -1
 }
 
-if {[gdb_compile "${srcdir}/${subdir}/${libsrcfile}" "${objdir}/${subdir}/${libfile}.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_shlib $libsrc $lib_sl $lib_opts] != ""
+     || [gdb_compile $srcfile $binfile executable $exec_opts] != ""} {
+    untested "Couldn't compile $libsrc or $srcfile."
+    return -1
 }
 
-if [istarget "hppa*-*-hpux*"] {
-    remote_exec build "ld -b ${objdir}/${subdir}/${libfile}.o -o ${objdir}/${subdir}/${libfile}.sl"
-} else {
-    set additional_flags "additional_flags=-shared"
-    if {[gdb_compile "${objdir}/${subdir}/${libfile}.o" "${objdir}/${subdir}/${libfile}.sl" executable [list debug $additional_flags]] != ""} {
-       gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
-    }
-}
+# Start with a fresh gdb.
 
 gdb_exit
 gdb_start
This page took 0.035729 seconds and 4 git commands to generate.