From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23011 invoked by alias); 2 Feb 2004 20:56:46 -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 22901 invoked from network); 2 Feb 2004 20:56:41 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 2 Feb 2004 20:56:41 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i12Kudb14901 for ; Mon, 2 Feb 2004 15:56:39 -0500 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 i12KucM14295; Mon, 2 Feb 2004 15:56:38 -0500 Received: from 192.168.1.129 (vpn50-55.rdu.redhat.com [172.16.50.55]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i12Kuab22988; Mon, 2 Feb 2004 12:56:37 -0800 From: Fred Fish Reply-To: fnf@ninemoons.com To: Daniel Jacobowitz Subject: Re: [RFA] Fix testsuite gdb.base/bang.exp to work with remote targets Date: Mon, 02 Feb 2004 20:56:00 -0000 User-Agent: KMail/1.5.4 Cc: gdb-patches@sources.redhat.com, fnf@redhat.com References: <200402021326.08063.fnf@ninemoons.com> <20040202203201.GA7318@nevyn.them.org> In-Reply-To: <20040202203201.GA7318@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200402021356.34295.fnf@ninemoons.com> X-SW-Source: 2004-02/txt/msg00033.txt.bz2 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)" } } 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. On the other hand, I'm not entirely comfortable with some of the assumptions made in gdb_run_cmd, such as jumping to "start" or "_start". I've seen some load images in the past that don't necessarily have the starting address in the image set to "start" or "_start", but instead do things like have it set to a reset vector at address zero that jumps to some other place in the image and eventually ends up going through "start". It would also be nice to know what this comment in gdb_run_cmd is all about: # This doesn't work quite right yet. -Fred