diff options
Diffstat (limited to 'src/client/windows/crash_generation/crash_generation_server.cc')
-rw-r--r-- | src/client/windows/crash_generation/crash_generation_server.cc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/client/windows/crash_generation/crash_generation_server.cc b/src/client/windows/crash_generation/crash_generation_server.cc index ae05243c..0af213ba 100644 --- a/src/client/windows/crash_generation/crash_generation_server.cc +++ b/src/client/windows/crash_generation/crash_generation_server.cc @@ -85,7 +85,7 @@ static bool IsClientRequestValid(const ProtocolMessage& msg) { msg.assert_info != NULL); } -#ifdef _DEBUG +#ifndef NDEBUG static bool CheckForIOIncomplete(bool success) { // We should never get an I/O incomplete since we should not execute this // unless the operation has finished and the overlapped event is signaled. If @@ -121,12 +121,12 @@ CrashGenerationServer::CrashGenerationServer( upload_request_callback_(upload_request_callback), upload_context_(upload_context), generate_dumps_(generate_dumps), + pre_fetch_custom_info_(true), dump_path_(dump_path ? *dump_path : L""), server_state_(IPC_SERVER_STATE_UNINITIALIZED), shutting_down_(false), overlapped_(), - client_info_(NULL), - pre_fetch_custom_info_(true) { + client_info_(NULL) { InitializeCriticalSection(&sync_); } @@ -922,9 +922,21 @@ bool CrashGenerationServer::GenerateDump(const ClientInfo& client, client.assert_info(), client.dump_type(), true); + if (!dump_generator.GenerateDumpFile(dump_path)) { return false; } + + // If the client requests a full memory dump, we will write a normal mini + // dump and a full memory dump. Both dump files use the same uuid as file + // name prefix. + if (client.dump_type() & MiniDumpWithFullMemory) { + std::wstring full_dump_path; + if (!dump_generator.GenerateFullDumpFile(&full_dump_path)) { + return false; + } + } + return dump_generator.WriteMinidump(); } |