From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26568 invoked by alias); 24 Feb 2004 22:40:37 -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 26543 invoked from network); 24 Feb 2004 22:40:32 -0000 Received: from unknown (HELO takamaka.act-europe.fr) (209.53.17.20) by sources.redhat.com with SMTP; 24 Feb 2004 22:40:32 -0000 Received: by takamaka.act-europe.fr (Postfix, from userid 507) id 9814F47D62; Tue, 24 Feb 2004 14:40:31 -0800 (PST) Date: Tue, 24 Feb 2004 22:40:00 -0000 From: Joel Brobecker To: gdb-patches@sources.redhat.com Subject: Re: [RFC/RFA] (testsuite/Ada) Add gdb_compile_ada Message-ID: <20040224224031.GD542@gnat.com> References: <20040224195615.GC542@gnat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040224195615.GC542@gnat.com> User-Agent: Mutt/1.4i X-SW-Source: 2004-02/txt/msg00701.txt.bz2 Hello, > 2004-02-24 J. Brobecker > > * lib/gdb.exp (gdb_compile_ada): New function. Please ignore this patch. It has a few problems: - Object files are placed in the testsuite directory. I'd rather see them being placed in gdb.ada. - There is a problem with gdb_compile_ada. In Ada target_compile always returns some output, so the current implementation thinks the compilation fails, while it is not necessarily the case. I changed the test to check for the dest file, rather than analyzing the output. Will send an updated patch when I have a complete ada testcase working. > Index: lib/gdb.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v > retrieving revision 1.49 > diff -u -p -r1.49 gdb.exp > --- lib/gdb.exp 23 Feb 2004 19:27:46 -0000 1.49 > +++ lib/gdb.exp 24 Feb 2004 19:50:10 -0000 > @@ -1361,6 +1361,17 @@ proc gdb_compile_objc {source dest type > } > } > > +proc gdb_compile_ada {source dest type options} { > + > + lappend options "compiler=gnatmake" > + > + set result [target_compile $source $dest $type $options] > + if { $result != "" } { > + verbose "target_compile failed: $result" 2 > + return "gdb_compile_ada failed: $result" > + } > +} > + > proc send_gdb { string } { > global suppress_flag; > if { $suppress_flag } { -- Joel