Return value of program being debugged
Grzegorz Cieslewski
cieslewski@hcs.ufl.edu
Sat Dec 15 14:33:00 GMT 2007
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
=====================================================
More information about the Gdb
mailing list