diff --git a/src/raddbg/raddbg_core.c b/src/raddbg/raddbg_core.c index 62275635..3597dab7 100644 --- a/src/raddbg/raddbg_core.c +++ b/src/raddbg/raddbg_core.c @@ -15841,6 +15841,10 @@ rd_frame(void) { rd_cmd(RD_CmdKind_Exit); } + else if(evt->code != 0) + { + rd_state->quit_after_success = 0; + } }break; case D_EventKind_Stop: { diff --git a/src/raddbg/raddbg_main.c b/src/raddbg/raddbg_main.c index 42e60c4b..e5cb3e9b 100644 --- a/src/raddbg/raddbg_main.c +++ b/src/raddbg/raddbg_main.c @@ -1117,6 +1117,8 @@ entry_point(CmdLine *cmd_line) "This will step into all targets after the debugger initially starts.\n\n" "--auto_run\n" "This will run all targets after the debugger initially starts.\n\n" + "--quit_after_success (or -q)\n" + "This will close the debugger automatically after all processes exit, if they all exited successfully (with code 0), and ran with no interruptions.\n\n" "--ipc \n" "This will launch the debugger in the non-graphical IPC mode, which is used to communicate with another running instance of the debugger. The debugger instance will launch, send the specified command, then immediately terminate. This may be used by editors or other programs to control the debugger.\n\n")); }break;