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]

gdb simulator exit status


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


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