From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4970 invoked by alias); 14 Apr 2005 16:44:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4856 invoked from network); 14 Apr 2005 16:44:12 -0000 Received: from unknown (HELO e31.co.us.ibm.com) (32.97.110.129) by sourceware.org with SMTP; 14 Apr 2005 16:44:12 -0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e31.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j3EGiBua427542 for ; Thu, 14 Apr 2005 12:44:11 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j3EGiANP230872 for ; Thu, 14 Apr 2005 10:44:11 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j3EGiA3X010935 for ; Thu, 14 Apr 2005 10:44:10 -0600 Received: from dyn9047022123-009047022128.beaverton.ibm.com (dyn9047022123-009047022128.beaverton.ibm.com [9.47.22.128]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j3EGiAXG010893 for ; Thu, 14 Apr 2005 10:44:10 -0600 From: Paul Gilliam Reply-To: pgilliam@us.ibm.com To: gdb-patches@sources.redhat.com Subject: [patch] update gdb.base/unload.exp to use new shared library infrastructure Date: Thu, 14 Apr 2005 16:44:00 -0000 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200504140943.44766.pgilliam@us.ibm.com> X-SW-Source: 2005-04/txt/msg00126.txt.bz2 2005-04-14 Paul Gilliam * gdb.base/unload.exp: Use new shared library infrastructure and update copyright. Index: gdb.base/unload.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/unload.exp,v retrieving revision 1.5 diff -c -3 -p -r1.5 unload.exp *** gdb.base/unload.exp 23 Nov 2004 19:51:35 -0000 1.5 --- gdb.base/unload.exp 14 Apr 2005 02:39:22 -0000 *************** *** 1,4 **** ! # Copyright 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify --- 1,4 ---- ! # Copyright 2003, 2004, 2005 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify *************** *** 16,23 **** # 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 --- 16,21 ---- *************** if ![isnative] then { *** 37,49 **** set testfile "unload" set libfile "unloadshr" set libsrcfile ${libfile}.c ! set srcfile ${testfile}.c ! set binfile ${objdir}/${subdir}/${testfile} set shlibdir ${objdir}/${subdir} ! ! if [get_compiler_info ${binfile}] { ! return -1 ! } set dl_lib_flag "" switch -glob [istarget] { --- 35,45 ---- set testfile "unload" set libfile "unloadshr" set libsrcfile ${libfile}.c ! set srcfile $srcdir/$subdir/$testfile.c ! set binfile $objdir/$subdir/$testfile set shlibdir ${objdir}/${subdir} ! set libsrc $srcdir/$subdir/$libfile.c ! set lib_sl $objdir/$subdir/$libfile.sl set dl_lib_flag "" switch -glob [istarget] { *************** switch -glob [istarget] { *** 52,97 **** "*-*-solaris*" { set dl_lib_flag "libs=-ldl" } 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." } ! # 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}/${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 [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." ! } } gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir --- 48,67 ---- "*-*-solaris*" { set dl_lib_flag "libs=-ldl" } default { } } + set lib_opts debug + set exec_opts [list debug $dl_lib_flag additional_flags=-DSHLIB_DIR\=\"${shlibdir}\"] ! if [get_compiler_info ${binfile}] { ! return -1 } ! if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" ! || [gdb_compile $srcfile $binfile executable $exec_opts] != ""} { ! gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } + # Start with a freash gdb. + gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir