Return value of program being debugged
Daniel Jacobowitz
drow@false.org
Sat Dec 15 15:07:00 GMT 2007
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
More information about the Gdb
mailing list