From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27415 invoked by alias); 17 Jan 2008 12:42:47 -0000 Received: (qmail 27406 invoked by uid 22791); 17 Jan 2008 12:42:47 -0000 X-Spam-Check-By: sourceware.org Received: from mail1.nsc.com (HELO mailgate1.nsc.com) (12.151.32.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 17 Jan 2008 12:42:27 +0000 X-WSS-ID: 0JUSGOJ-05-W6G-01 Received: from SCNTRDCSS6.nsc.com (emf.nsc.com [192.168.7.28]) by mailgate1.nsc.com (Tumbleweed MailGate) with ESMTP id C5FDC38048369 for ; Thu, 17 Jan 2008 04:43:31 -0800 (PST) Received: from [10.188.132.130] by SCNTRDCSS6.nsc.com with ESMTP (-Hi-); Thu, 17 Jan 2008 04:42:09 -0800 X-Server-Uuid: CDE0D3F6-4EC6-4DC9-81EF-DBBF12AF9A3C Received: from [139.187.78.222] by scmh1.nsc.com with ESMTP for gdb@sourceware.org; Thu, 17 Jan 2008 04:42:08 -0800 Message-ID: <478F4D01.8000202@india.nsc.com> Date: Thu, 17 Jan 2008 12:42:00 -0000 From: "M R Swami Reddy" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: gdb@sourceware.org Subject: gdb simulator exit status X-WSS-ID: 6B9192900ZS471066-02-01 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00144.txt.bz2 Hi, I have C file as: == main () { return 1; } === When I compile and run it, the status value is '1' > a.out > echo $status > 1 When I execute the same "a.out" on gdb simulator, the status shows as "0" (ie gdb's exit status) and gdb shows "Program exited with code 01". Can you please suggest the way (if any) to get the gdb simulator's exit status with "echo $status" command"? Thank in advance. Thanks, Swami