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]

Re: gdb simulator exit status


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


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