diff options
author | Andrew Stubbs <andrew.stubbs@st.com> | 2005-11-04 11:49:12 +0000 |
---|---|---|
committer | Andrew Stubbs <andrew.stubbs@st.com> | 2005-11-04 11:49:12 +0000 |
commit | 4b0ad76243714b959a63aa42649fa3cf6c886ef2 (patch) | |
tree | 510a04027769d4e032c7766378ed9475a363f296 /gdb/infrun.c | |
parent | f6235d4cfac03962a505970ef92f231860c58517 (diff) | |
download | gdb-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/infrun.c')
-rw-r--r-- | gdb/infrun.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/infrun.c b/gdb/infrun.c index 4c2a78d..f1ebc3e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -2931,6 +2931,11 @@ print_stop_reason (enum inferior_stop_reason stop_reason, int stop_info) async_reason_lookup (EXEC_ASYNC_EXITED_NORMALLY)); ui_out_text (uiout, "\nProgram exited normally.\n"); } + { + /* Support the --return-child-result option. */ + extern int return_child_result_value; + return_child_result_value = stop_info; + } break; case SIGNAL_RECEIVED: /* Signal received. The signal table tells us to print about |