From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26121 invoked by alias); 20 Apr 2005 00:31:00 -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 26081 invoked from network); 20 Apr 2005 00:30:55 -0000 Received: from unknown (HELO e35.co.us.ibm.com) (32.97.110.133) by sourceware.org with SMTP; 20 Apr 2005 00:30:55 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e35.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j3K0UaLg514450 for ; Tue, 19 Apr 2005 20:30:37 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j3K0Uawv299184 for ; Tue, 19 Apr 2005 18:30:36 -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 j3K0UZLw021185 for ; Tue, 19 Apr 2005 18:30:36 -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 j3K0UZWv021160; Tue, 19 Apr 2005 18:30:35 -0600 From: Paul Gilliam Reply-To: pgilliam@us.ibm.com To: gdb-patches@sources.redhat.com Subject: Re: [patch] update gdb.base/shreloc.exp to use new shared library infrastructure Date: Wed, 20 Apr 2005 00:31:00 -0000 User-Agent: KMail/1.6.2 Cc: Daniel Jacobowitz References: <200504131013.36814.pgilliam@us.ibm.com> <20050414192309.GA19262@nevyn.them.org> In-Reply-To: <20050414192309.GA19262@nevyn.them.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200504191731.06753.pgilliam@us.ibm.com> X-SW-Source: 2005-04/txt/msg00231.txt.bz2 On Thursday 14 April 2005 12:23, Daniel Jacobowitz wrote: > On Wed, Apr 13, 2005 at 09:13:36AM -0800, Paul Gilliam wrote: > > This patch updates gdb.base/shreloc.exp to use the new shared library infrastructure in > > lib/gdb.exp. All the stuff that has been cut from shlib-call.exp is now part of 'gdb-compile' > > or 'gdb-compile-shlib' (new) in lib/gdb.exp. > > > > This patch depends on the shared infrastructure patch: > > http://sources.redhat.com/ml/gdb-patches/2005-04/msg00096.html > > Waitasec... > > > ! set additional_flags "additional_flags=-shared" > > ! > > ! if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } { > > ! set additional_flags "${additional_flags} -Wl,--image-base,0x04000000" > > } > > The common bits don't have support for cygwin/mingw32 DLLs. So just > removing this isn't right. > > > ! set lib_opts [list debug additional_flags=-qstatsym additional_flags=-qdbxextra] > > Remind me what this option means? > > Here is the next rev of the patch: 2005-04-19 Paul Gilliam * gdb.base/shreloc.exp: Change to use new shared library infrastructure and update copyright date. Index: gdb.base/shreloc.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shreloc.exp,v retrieving revision 1.2 diff -c -3 -p -r1.2 shreloc.exp *** gdb.base/shreloc.exp 11 Nov 2003 17:58:28 -0000 1.2 --- gdb.base/shreloc.exp 19 Apr 2005 23:59:46 -0000 *************** *** 1,4 **** ! # Copyright (C) 2003 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by --- 1,4 ---- ! # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by *************** set prms_id 0 *** 40,71 **** set bug_id 0 set workdir ${objdir}/${subdir} ! foreach module [list "shreloc" "shreloc1" "shreloc2"] { ! if {[gdb_compile "${srcdir}/${subdir}/${module}.c" "${workdir}/${module}.o" object {debug}] != ""} { ! untested "Couldn't compile ${module}.c" ! return -1 ! } ! } ! ! set additional_flags "additional_flags=-shared" ! ! if {([istarget "*pc-cygwin"] || [istarget "*pc-mingw32"]) } { ! set additional_flags "${additional_flags} -Wl,--image-base,0x04000000" } ! foreach module [list "shreloc1" "shreloc2"] { ! if {[gdb_compile "${workdir}/${module}.o" "${workdir}/${module}.dll" executable [list debug $additional_flags]] != ""} { ! untested "Couldn't link ${module}.dll" ! return -1 ! } } ! if {[gdb_compile [list "${workdir}/shreloc.o" "${workdir}/shreloc1.dll" "${workdir}/shreloc2.dll"] "${workdir}/shreloc" executable debug] != ""} { ! untested "Couldn't link shreloc executable" return -1 } gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir --- 40,75 ---- set bug_id 0 set workdir ${objdir}/${subdir} + set testfile "shreloc" + set libfile1 "shreloc1" + set libfile2 "shreloc2" + set srcfile $srcdir/$subdir/$testfile.c + set lib1src $srcdir/$subdir/$libfile1.c + set lib2src $srcdir/$subdir/$libfile2.c + set binfile $objdir/$subdir/$testfile + set lib1_sl $objdir/$subdir/$libfile1.sl + set lib2_sl $objdir/$subdir/$libfile2.sl ! if [get_compiler_info ${binfile}] { ! return -1 } ! if [test_compiler_info "xlc-*"] { ! set lib_opts [list debug additional_flags=-qstatsym additional_flags=-qdbxextra] ! } else { ! set lib_opts debug } + set exec_opts [list debug shlib=$lib1_sl shlib=$lib2_sl] ! if { [gdb_compile_shlib $lib1src $lib1_sl $lib_opts] != "" ! || [gdb_compile_shlib $lib2src $lib2_sl $lib_opts] != "" ! || [gdb_compile $srcfile $binfile executable $exec_opts] != ""} { ! untested "Could not compile $lib1src, $lib2src or $srcfile" return -1 } + # Start with a fresh gdb. + gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir