This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
=====================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]