aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc/gdb.texinfo
diff options
context:
space:
mode:
authorAndrew Stubbs <andrew.stubbs@st.com>2005-11-04 11:49:12 +0000
committerAndrew Stubbs <andrew.stubbs@st.com>2005-11-04 11:49:12 +0000
commit4b0ad76243714b959a63aa42649fa3cf6c886ef2 (patch)
tree510a04027769d4e032c7766378ed9475a363f296 /gdb/doc/gdb.texinfo
parentf6235d4cfac03962a505970ef92f231860c58517 (diff)
downloadgdb-4b0ad76243714b959a63aa42649fa3cf6c886ef2.zip
gdb-4b0ad76243714b959a63aa42649fa3cf6c886ef2.tar.gz
gdb-4b0ad76243714b959a63aa42649fa3cf6c886ef2.tar.bz2
2005-11-04 Andrew Stubbs <andrew.stubbs@st.com>
* infrun.c (print_stop_reason): Set return_child_result_value on exit. * main.c (return_child_result): New variable. (return_child_result_value): Likewise. (captured_main): Add option --return-child-result. Replace call to target_detach and exit (in batch mode) with quit_force. (print_gdb_help): Add option --return-child-result. * top.c (quit_force): Return child result if appropriate. docs/ * gdb.texinfo (Choosing modes): Add --return-child-result.
Diffstat (limited to 'gdb/doc/gdb.texinfo')
-rw-r--r--gdb/doc/gdb.texinfo21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 75ae4ef..5402d6a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -1007,6 +1007,27 @@ messages, for example.
Note that targets that give their output via @value{GDBN}, as opposed to
writing directly to @code{stdout}, will also be made silent.
+@item -return-child-result
+@cindex @code{--return-child-result}
+The return code from @value{GDBN} will be the return code from the child
+process (the process being debugged), with the following exceptions:
+
+@itemize @bullet
+@item
+@value{GDBN} exits abnormally. E.g., due to an incorrect argument or an
+internal error. In this case the exit code is the same as it would have been
+without @samp{-return-child-result}.
+@item
+The user quits with an explicit value. E.g., @samp{quit 1}.
+@item
+The child process never runs, or is not allowed to terminate, in which case
+the exit code will be -1.
+@end itemize
+
+This option is useful in conjunction with @samp{-batch} or @samp{-batch-silent},
+when @value{GDBN} is being used as a remote program loader or simulator
+interface.
+
@item -nowindows
@itemx -nw
@cindex @code{--nowindows}