From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29955 invoked by alias); 17 Jan 2008 14:32:31 -0000 Received: (qmail 29929 invoked by uid 22791); 17 Jan 2008 14:32:31 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog12.obsmtp.com (HELO s200aog12.obsmtp.com) (207.126.144.126) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 17 Jan 2008 14:32:00 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob012.postini.com ([207.126.147.11]) with SMTP; Thu, 17 Jan 2008 14:31:54 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 96D03DAB2; Thu, 17 Jan 2008 14:31:53 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 062AB4BFA6; Thu, 17 Jan 2008 14:31:52 +0000 (GMT) Received: from [164.129.12.194] (bri0669.bri.st.com [164.129.12.194]) by mail1.bri.st.com (MOS 3.7.5a-GA) with ESMTP id CJP38998 (AUTH stubbsa); Thu, 17 Jan 2008 14:31:51 GMT Message-ID: <478F66D8.6000808@st.com> Date: Thu, 17 Jan 2008 14:32:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: M R Swami Reddy Cc: gdb@sourceware.org Subject: Re: gdb simulator exit status References: <478F4D01.8000202@india.nsc.com> In-Reply-To: <478F4D01.8000202@india.nsc.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-01/txt/msg00146.txt.bz2 M R Swami Reddy wrote: > Can you please suggest the way (if any) to get the gdb simulator's exit > status with "echo $status" command"? Well, it works for me (target sh-elf), but maybe I'm using a more recent GDB or something. Anyway, obviously it isn't working for you, so try this: gdb --batch-silent \ --return-child-result \ -ex "target sim" \ -ex load \ -ex run \ a.out Hope that helps Andrew