This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
gdb simulator exit status
- From: "M R Swami Reddy" <swami at india dot nsc dot com>
- To: gdb at sourceware dot org
- Date: Thu, 17 Jan 2008 18:11:37 +0530
- Subject: 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