From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25109 invoked by alias); 2 Feb 2004 21:01:50 -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 25101 invoked from network); 2 Feb 2004 21:01:49 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 2 Feb 2004 21:01:49 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AnlCW-0001oL-OA; Mon, 02 Feb 2004 16:01:48 -0500 Date: Mon, 02 Feb 2004 21:01:00 -0000 From: Daniel Jacobowitz To: Fred Fish Cc: gdb-patches@sources.redhat.com, fnf@redhat.com Subject: Re: [RFA] Fix testsuite gdb.base/bang.exp to work with remote targets Message-ID: <20040202210148.GA5510@nevyn.them.org> Mail-Followup-To: Fred Fish , gdb-patches@sources.redhat.com, fnf@redhat.com References: <200402021326.08063.fnf@ninemoons.com> <20040202203201.GA7318@nevyn.them.org> <200402021356.34295.fnf@ninemoons.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200402021356.34295.fnf@ninemoons.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00034.txt.bz2 On Mon, Feb 02, 2004 at 01:56:34PM -0700, Fred Fish wrote: > On Monday 02 February 2004 13:32, Daniel Jacobowitz wrote: > > How about gdb_run_cmd? > > Initially I tried that and had some problems, but I just went back and tried > the following: > > gdb_run_cmd > gdb_expect { > -re ".*Program exited normally\." { > pass "run program" > } > timeout { > fail "run program (timeout)" > } > } I would prefer this. It also handles gdbserver correctly (restart the server, continue). > which worked: > > (gdb) jump *start > No symbol "start" in current context. > (gdb) jump *_start > Continuing at 0x1016. > 0 > > *** EXIT code 0 > > Program exited normally. > PASS: gdb.base/bang.exp: run program > > I'm not sure what happened the first time I tried gdb_run_cmd. > > However, there is some precedence for just checking use_gdb_stub to > decide whether to "run" or "continue" as there are several other > places in the testsuite where this is done. Though it could be argued > that perhaps they should be converted to use gdb_run_cmd also. Well, presumably you want to say "continue", because you know we're at the beginning. But for some targets (at least, once upon a time, based on gdb_run_cmd), this wasn't enough. If you want to preserve the use-continue version, please work with the utility functions in gdb.exp, rather than hardcoding more continues in the testsuite. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer