From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22148 invoked by alias); 18 Sep 2002 09:13:02 -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 22140 invoked from network); 18 Sep 2002 09:13:01 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 18 Sep 2002 09:13:01 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g8I8trd00676 for ; Wed, 18 Sep 2002 04:55:53 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g8I9Cxd05422 for ; Wed, 18 Sep 2002 05:12:59 -0400 Received: from cygbert.vinschen.de (vpn50-15.rdu.redhat.com [172.16.50.15]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g8I9CvC15028 for ; Wed, 18 Sep 2002 02:12:58 -0700 Received: (from corinna@localhost) by cygbert.vinschen.de (8.11.6/8.9.3/Linux sendmail 8.9.3) id g8I9Ctm28757 for gdb-patches@sources.redhat.com; Wed, 18 Sep 2002 11:12:55 +0200 Date: Wed, 18 Sep 2002 02:13:00 -0000 From: Corinna Vinschen To: gdb-patches@sources.redhat.com Subject: Re: [RFA] testsuite: Fix rerun_to_main to allow restarting Message-ID: <20020918111255.Y29920@cygbert.vinschen.de> Reply-To: gdb-patches@sources.redhat.com Mail-Followup-To: gdb-patches@sources.redhat.com References: <20020914115139.N1574@cygbert.vinschen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020914115139.N1574@cygbert.vinschen.de> User-Agent: Mutt/1.3.22.1i X-SW-Source: 2002-09/txt/msg00379.txt.bz2 Hi, On Sat, Sep 14, 2002 at 11:51:39AM +0200, Corinna Vinschen wrote: > the following patch fixes an error in the testsuite lib. In lib/gdb.exp, > the proc rerun_to_main() doesn't take into account, that some targets > never actually exit, but instead are programatically trapped in some > _exit function. > [...] may I treat this as obvious patch? I'm not sure if that still counts as one... Corinna > * lib/gdb.exp (rerun_to_main): Allow restarting application. > * gdb.base/ena-dis-br.exp (rerun_to_main): Eliminate. > > Index: lib/gdb.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v > retrieving revision 1.26 > diff -u -p -r1.26 gdb.exp > --- lib/gdb.exp 13 Sep 2002 17:20:11 -0000 1.26 > +++ lib/gdb.exp 14 Sep 2002 09:44:44 -0000 > @@ -1685,6 +1685,10 @@ proc rerun_to_main {} { > } else { > send_gdb "run\n" > gdb_expect { > + -re "The program .* has been started already.*y or n. $" { > + send_gdb "y\n" > + exp_continue > + } > -re "Starting program.*$gdb_prompt $"\ > {pass "rerun to main" ; return 0} > -re "$gdb_prompt $"\ > Index: gdb.base/ena-dis-br.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ena-dis-br.exp,v > retrieving revision 1.2 > diff -u -p -r1.2 ena-dis-br.exp > --- gdb.base/ena-dis-br.exp 6 Mar 2001 08:21:50 -0000 1.2 > +++ gdb.base/ena-dis-br.exp 14 Sep 2002 09:44:44 -0000 > @@ -38,30 +38,6 @@ if { [gdb_compile "${srcdir}/${subdir}/ > gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." > } > > -proc rerun_to_main {} { > - global gdb_prompt > - > - if [target_info exists use_gdb_stub] { > - gdb_run_cmd > - gdb_expect { > - -re ".*Breakpoint .*main .*$gdb_prompt $"\ > - {pass "rerun to main" ; return 0} > - -re "$gdb_prompt $"\ > - {fail "rerun to main" ; return 0} > - timeout {fail "(timeout) rerun to main" ; return 0} > - } > - } else { > - send_gdb "run\n" > - gdb_expect { > - -re "Starting program.*$gdb_prompt $"\ > - {pass "rerun to main" ; return 0} > - -re "$gdb_prompt $"\ > - {fail "rerun to main" ; return 0} > - timeout {fail "(timeout) rerun to main" ; return 0} > - } > - } > -} > - > gdb_exit > gdb_start > gdb_reinitialize_dir $srcdir/$subdir