From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31245 invoked by alias); 6 May 2004 16:10:38 -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 31238 invoked from network); 6 May 2004 16:10:38 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 6 May 2004 16:10:38 -0000 Received: from drow by nevyn.them.org with local (Exim 4.32 #1 (Debian)) id 1BLlSE-0007CZ-VP; Thu, 06 May 2004 12:10:35 -0400 Date: Thu, 06 May 2004 16:10:00 -0000 From: Daniel Jacobowitz To: Grant Edwards Cc: gdb@sources.redhat.com Subject: Re: How to tell gdb to exit? Message-ID: <20040506161034.GA27629@nevyn.them.org> Mail-Followup-To: Grant Edwards , gdb@sources.redhat.com References: <20040506155013.GB12206@grante.dsl.visi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040506155013.GB12206@grante.dsl.visi.com> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-05/txt/msg00047.txt.bz2 On Thu, May 06, 2004 at 10:50:14AM -0500, Grant Edwards wrote: > > I'm trying to figure out how to run gdb from a shell script, > and everything works, except I can't get gdb to exit. What I > want to do is: > > 1) set target to /dev/ttyS0 > 2) load an elf file > 3) start it (continue) > 4) exit gdb > > Steps 1-3 work great, but at step 4) gdb won't accept a new > command in human-interface mode, so this doesn't work: > > #!/bin/bash > h8300-elf-gdb < set arch h8300h > target remote /dev/ttyS0 > load test.elf > cont > quit > EOF > > I tried "detach" instead of "cont" since the info file says > that it continues exection, but it doesn't actual seem to do > that for remote targets. It should. Whether it does or not depends on your remote stub, though. -- Daniel Jacobowitz