gdb simulator exit status

M R Swami Reddy swami@india.nsc.com
Thu Jan 17 12:42:00 GMT 2008


Hi,
I have C file as:
==
main () {
   return 1;
}
===

When I compile and run it, the status value is '1'
 > a.out
 > echo $status
 > 1

When I execute the same "a.out" on gdb simulator, the status shows as "0" (ie 
gdb's exit status) and gdb shows "Program exited with code 01".

Can you please suggest the way (if any) to get the gdb simulator's exit status 
with "echo $status" command"?

Thank in advance.

Thanks,
Swami



More information about the Gdb mailing list