This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Return value of program being debugged
- From: "Grzegorz Cieslewski" <cieslewski at hcs dot ufl dot edu>
- To: gdb at sourceware dot org
- Date: Sat, 15 Dec 2007 09:33:02 -0500
- Subject: Return value of program being debugged
Hi,
I have encountered an interesting problem.
Upon executing the program:
int main()
{
return(-1);
}
in gdb I get the following output
(gdb) r
Starting program: /tmp/test
Program exited with code 0377.
(gdb) q
Could someone tell me how is "-1" mapped to "0377"?
Greg
--
=====================================================
Grzegorz Cieslewski
Research Assistant
High-performance Computing & Simulation (HCS) Research Laboratory
University of Florida, Dept. of Electrical and Computer Engineering
330 Benton Hall, Gainesville, FL, 32611-6200
Phone: (352) 392-9041
Email: cieslewski@hcs.ufl.edu
Web: www.hcs.ufl.edu
=====================================================