RFC: GDB as a loader 2/3: return child result
Andrew STUBBS
andrew.stubbs@st.com
Tue Oct 18 11:30:00 GMT 2005
Hi all,
The attached patch implements a new option --return-child-result. This
option causes GDB to return the return value of the last child
(inferior) program to run. The patch assumes that the batch-silent patch
has already been applied.
Note that 'quit <expr>' still works as expected. Also, any exit through
a mechanism other than quit_force (i.e. errors) gives the same exit code
as it did before. Batch mode has been adjusted to exit through
quit_force in order to ensure it give the right result.
I am not sure that this has been implemented in the best way. The
declaration of extern variables probably ought to be moved to a header
file somewhere, but I'm not sure which is best. It has also been
suggested that it ought to use the value stored in the existing
$_exitcode convenience variable.
Thanks
Andrew Stubbs
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: return-child-result.patch
URL: <http://sourceware.org/pipermail/gdb/attachments/20051018/b7b8f40e/attachment.ksh>
More information about the Gdb
mailing list