Skip to content

Commit

Permalink
Added full_dump capability to dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Sep 11, 2021
1 parent fa00540 commit 42f7ccc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion crash_reporting/crash_reporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
#include "crash_reporting.h"
#include "client/windows/handler/exception_handler.h"

// Large dump with all process memory.
const MINIDUMP_TYPE FullDumpType = static_cast<MINIDUMP_TYPE>(
MiniDumpWithFullMemory | // Full memory from process.
MiniDumpWithProcessThreadData | // Get PEB and TEB.
MiniDumpWithHandleData | // Get all handle information.
MiniDumpWithUnloadedModules); // Get unloaded modules when available.

struct InProcessCrashReporting::Detail {

// Delegate back to breakpad
Expand Down Expand Up @@ -36,6 +43,7 @@ bool InProcessCrashReporting::Detail::HandleCrashCallbackDelegate(const wchar_t*
}

InProcessCrashReporting::InProcessCrashReporting(const std::wstring &minidump_folder,
bool full_dump,
std::function<void(const std::wstring&)> crash_callback)
: crash_callback_(crash_callback)
{
Expand All @@ -48,7 +56,10 @@ InProcessCrashReporting::InProcessCrashReporting(const std::wstring &minidump_fo
nullptr,
InProcessCrashReporting::Detail::HandleCrashCallbackDelegate,
this,
ExceptionHandler::HANDLER_ALL
ExceptionHandler::HANDLER_ALL,
full_dump ? FullDumpType : MiniDumpNormal,
(HANDLE) nullptr,
nullptr
);

}
Expand Down
1 change: 1 addition & 0 deletions crash_reporting/crash_reporting.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace google_breakpad {
class InProcessCrashReporting {
public:
InProcessCrashReporting(const std::wstring &minidump_folder,
bool full_dump,
std::function<void(const std::wstring&)> crash_callback);
~InProcessCrashReporting();

Expand Down

0 comments on commit 42f7ccc

Please sign in to comment.