From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13725 invoked by alias); 10 May 2002 19:51:21 -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 13700 invoked from network); 10 May 2002 19:51:19 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 10 May 2002 19:51:19 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id DADDA3DEC; Fri, 10 May 2002 15:51:26 -0400 (EDT) Message-ID: <3CDC24BE.50203@cygnus.com> Date: Fri, 10 May 2002 12:51:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0rc1) Gecko/20020429 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder , fnasser@redhat.com, Michael Elizabeth Chastain Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Add "needs_status_wrapper" feature to gdb testsuite. References: <200205070035.g470ZL426477@reddwarf.sfbay.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-05/txt/msg00361.txt.bz2 Hmm, This doesn't work with existing multi-lib configurations. The second and further test runs get linked with the wrong wrapper (because it wasn't re-compiled) :-( Can this please be pulled or disabled until the problem is fixed? Andrew > This is a feature that has been being used in the GCC testsuite, > but I was completely unaware of it before now. > > This enables tests that look for an exit status to succeed even > on targets that don't implement the exit status. I think it's > pretty cool! > > I've modified two tests from gdb/testsuite to take advantage of it. > I'm not sure which other tests may also need modification, but > now there are a couple of examples to look at. > > Index: lib/gdb.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v > retrieving revision 1.15 > diff -p -r1.15 gdb.exp > *** lib/gdb.exp 3 Apr 2002 16:17:11 -0000 1.15 > --- lib/gdb.exp 7 May 2002 00:10:06 -0000 > *************** proc gdb_preprocess {source dest args} { > *** 1092,1099 **** > --- 1092,1125 ---- > return $result; > } > > + set gdb_wrapper_initialized 0 > + > + proc gdb_wrapper_init { args } { > + global gdb_wrapper_initialized; > + global gdb_wrapper_file; > + global gdb_wrapper_flags; return; > + if { $gdb_wrapper_initialized == 1 } { return; } > + > + if {[target_info exists needs_status_wrapper] && \ > + [target_info needs_status_wrapper] != "0" && \ > + ![info exists gdb_wrapper_file]} { > + set result [build_wrapper "testglue.o"]; > + if { $result != "" } { > + set gdb_wrapper_file [lindex $result 0]; > + set gdb_wrapper_flags [lindex $result 1]; > + } else { > + warning "Status wrapper failed to build." > + } > + } > + set gdb_wrapper_initialized 1 > + } > +