From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13273 invoked by alias); 3 Jun 2003 13:07:48 -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 13236 invoked from network); 3 Jun 2003 13:07:47 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 3 Jun 2003 13:07:47 -0000 Received: from dsl093-172-017.pit1.dsl.speakeasy.net ([66.93.172.17] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19NBWd-0008QH-00; Tue, 03 Jun 2003 08:08:27 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19NBVw-0003YS-00; Tue, 03 Jun 2003 09:07:44 -0400 Date: Tue, 03 Jun 2003 13:07:00 -0000 From: Daniel Jacobowitz To: Raoul Gough Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Add shared object relocation tests Message-ID: <20030603130744.GB13577@nevyn.them.org> Mail-Followup-To: Raoul Gough , gdb-patches@sources.redhat.com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-SW-Source: 2003-06/txt/msg00123.txt.bz2 On Tue, Jun 03, 2003 at 11:14:44AM +0100, Raoul Gough wrote: > I've written a test for load-time relocation of shared objects, to verify > that the symbols in gdb match the real (loaded) locations in memory. > This was originally designed to test some patches to coffread.c, but > is probably appropriate wherever shared objects are available. This > is related to PR 1132 in Gnats. Tested under i686-pc-cygwin and > i686-pc-linux. > > There may be problems on systems where shared objects are not > supported - this will probably result in compilation or linkage > failures during the test (and I think the test is then skipped?). > > This would add the following files to src/gdb/testsuite/gdb.base: > > shreloc.exp > shreloc.c > shreloc1.c > shreloc2.c > > Should I go ahead and add the new files? First of all, even new files get a changelog entry. It will go in gdb/testeuite/ChangeLog. > foreach module [list "shreloc" "shreloc1" "shreloc2"] { > if {[gdb_compile "${srcdir}/${subdir}/${module}.c" "${workdir}/${module}.o" object {debug}] != ""} { > gdb_suppress_entire_file "${module}.c compile failed, so all tests in this file will automatically fail." > 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]] != ""} { > gdb_suppress_entire_file "${module}.dll link failed, so all tests in this file will automatically fail." > return -1 > } > } > > if {[gdb_compile [list "${workdir}/shreloc.o" "${workdir}/shreloc1.dll" "${workdir}/shreloc2.dll"] "${workdir}/shreloc" executable > debug] != ""} { > gdb_suppress_entire_file "shreloc link failed, so all tests in this file will automatically fail." > return -1 > } Please just use return, not gdb_suppress_entire_file. In particular, using both causes the _next_ test to fail, I think. Other than those two details, this is OK. Give other people a day or so to comment and then check it in. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer