From 9271fcc86d668a3d25bad3f98dcb1cefc20da88b Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Fri, 31 Aug 2007 02:34:24 +0200 Subject: [PATCH] winedbg: 'winedbg --auto' and 'winedbg --minidump' should detach when done so as to not mess up the crashed process exit code. --- dlls/kernel32/tests/debugger.c | 2 +- programs/winedbg/tgt_active.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/tests/debugger.c b/dlls/kernel32/tests/debugger.c index 54aae65f279..19ab840549b 100644 --- a/dlls/kernel32/tests/debugger.c +++ b/dlls/kernel32/tests/debugger.c @@ -237,7 +237,7 @@ static void crash_and_winedbg(HKEY hkey, const char* argv0) trace("waiting for child exit...\n"); ok(WaitForSingleObject(info.hProcess, 60000) == WAIT_OBJECT_0, "Timed out waiting for the child to crash\n"); ok(GetExitCodeProcess(info.hProcess, &exit_code), "GetExitCodeProcess failed: err=%d\n", GetLastError()); - todo_wine ok(exit_code == STATUS_ACCESS_VIOLATION, "exit code = %08x\n", exit_code); + ok(exit_code == STATUS_ACCESS_VIOLATION, "exit code = %08x\n", exit_code); CloseHandle(info.hProcess); } diff --git a/programs/winedbg/tgt_active.c b/programs/winedbg/tgt_active.c index 348895de688..42bc9d69689 100644 --- a/programs/winedbg/tgt_active.c +++ b/programs/winedbg/tgt_active.c @@ -893,7 +893,7 @@ enum dbg_start dbg_active_auto(int argc, char* argv[]) if (ds != start_ok) return ds; hFile = parser_generate_command_file("echo Modules:", "info share", "echo Threads:", "info threads", - NULL); + "detach", NULL); } else if (!strcmp(argv[0], "--minidump")) { @@ -942,7 +942,7 @@ enum dbg_start dbg_active_auto(int argc, char* argv[]) /* FIXME: should generate unix name as well */ dbg_printf("Capturing program state in %s\n", tmp + 9); } - hFile = parser_generate_command_file(tmp, NULL); + hFile = parser_generate_command_file(tmp, "detach", NULL); } else return start_error_parse; if (hFile == INVALID_HANDLE_VALUE) return start_error_parse;