From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20181 invoked by alias); 15 Dec 2007 15:07:38 -0000 Received: (qmail 20172 invoked by uid 22791); 15 Dec 2007 15:07:37 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 15 Dec 2007 15:07:25 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AE07498054; Sat, 15 Dec 2007 15:07:23 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8314A98052; Sat, 15 Dec 2007 15:07:23 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1J3Ybq-0007rn-46; Sat, 15 Dec 2007 10:07:22 -0500 Date: Sat, 15 Dec 2007 15:07:00 -0000 From: Daniel Jacobowitz To: Grzegorz Cieslewski Cc: gdb@sourceware.org Subject: Re: Return value of program being debugged Message-ID: <20071215150722.GA30180@caradoc.them.org> Mail-Followup-To: Grzegorz Cieslewski , gdb@sourceware.org References: <7aa837f80712150633t11dbfc41wb865f5797cc1d897@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7aa837f80712150633t11dbfc41wb865f5797cc1d897@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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: 2007-12/txt/msg00104.txt.bz2 On Sat, Dec 15, 2007 at 09:33:02AM -0500, Grzegorz Cieslewski wrote: > (gdb) r > Starting program: /tmp/test > > Program exited with code 0377. > (gdb) q > > Could someone tell me how is "-1" mapped to "0377"? (gdb) p/x 0377 $1 = 0xff Take a look at the manual page for waitpid, and the definitions of the various waitstatus macros, to see how Unix systems represent exit codes. -- Daniel Jacobowitz CodeSourcery