From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7429 invoked by alias); 3 Jan 2005 13:05:20 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 7249 invoked from network); 3 Jan 2005 13:05:07 -0000 Received: from unknown (HELO mail.netspace.net.au) (203.10.110.71) by sourceware.org with SMTP; 3 Jan 2005 13:05:07 -0000 Received: from [192.168.1.11] (220-253-35-78.VIC.netspace.net.au [220.253.35.78]) by mail.netspace.net.au (Postfix) with ESMTP id 8DE7142F26 for ; Tue, 4 Jan 2005 00:05:05 +1100 (EST) Message-ID: <41D943FF.6080209@netspace.net.au> Date: Mon, 03 Jan 2005 13:05:00 -0000 From: Russell Shaw User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4 MIME-Version: 1.0 Cc: gdb@sources.redhat.com Subject: Re: Pause References: <41D921DE.6030109@netspace.net.au> In-Reply-To: <41D921DE.6030109@netspace.net.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-01/txt/msg00021.txt.bz2 Russell Shaw wrote: > Hi, > I set up .gdbinit so that with a single command, gdb can > load a new file to be debugged, and start a simulator: > > define simul > detach > shell killall -sHUP simulavr > shell simulavr -g -p 4242 -d atmega16 -c 16000000 loader_02.bin & > file loader_02 > target remote localhost:4242 > end > > This works ok if i type one line at a time. If i type "simul", the > commands happen too fast and gdb gives an error message before the > simulator has started. Does gdb have a "pause" or delay command? > I need one here: > > define simul > detach > shell killall -sHUP simulavr > shell simulavr -g -p 4242 -d atmega16 -c 16000000 loader_02.bin & > file loader_02 > > < delay 300ms > > > target remote localhost:4242 > end On second thoughts, i'll modify simulavr so that it sets itself up properly before it forks (instead of using the shell fork &).