This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: gdb simulator exit status
- From: Andrew STUBBS <andrew dot stubbs at st dot com>
- To: M R Swami Reddy <swami at india dot nsc dot com>
- Cc: gdb at sourceware dot org
- Date: Thu, 17 Jan 2008 14:31:52 +0000
- Subject: Re: gdb simulator exit status
- References: <478F4D01.8000202@india.nsc.com>
M R Swami Reddy wrote:
Can you please suggest the way (if any) to get the gdb simulator's exit
status with "echo $status" command"?
Well, it works for me (target sh-elf), but maybe I'm using a more recent
GDB or something.
Anyway, obviously it isn't working for you, so try this:
gdb --batch-silent \
--return-child-result \
-ex "target sim" \
-ex load \
-ex run \
a.out
Hope that helps
Andrew