From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12293 invoked by alias); 6 May 2004 15:50:18 -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 12263 invoked from network); 6 May 2004 15:50:17 -0000 Received: from unknown (HELO omr5.netsolmail.com) (216.168.230.142) by sources.redhat.com with SMTP; 6 May 2004 15:50:17 -0000 Received: from ms5.netsolmail.com (IDENT:mirapoint@[216.168.230.178]) by omr5.netsolmail.com (8.12.10/8.12.10) with ESMTP id i46FjGV8029453 for ; Thu, 6 May 2004 11:45:16 -0400 (EDT) Received: from rivatek.dnsalias.net (rrcs-west-67-52-40-137.biz.rr.com [67.52.40.137]) by ms5.netsolmail.com (Mirapoint Messaging Server MOS 3.2.2-GA) with ESMTP id BGX59227; Thu, 6 May 2004 11:50:15 -0400 (EDT) Received: by rivatek.dnsalias.net (Postfix, from userid 500) id 21D6BA9D9F; Thu, 6 May 2004 10:50:14 -0500 (CDT) Date: Thu, 06 May 2004 15:50:00 -0000 From: Grant Edwards To: gdb@sources.redhat.com Subject: How to tell gdb to exit? Message-ID: <20040506155013.GB12206@grante.dsl.visi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-05/txt/msg00044.txt.bz2 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 <