-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
66 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,38 @@ | ||
#include "./breakpad_client.hpp" | ||
|
||
// if linux | ||
#ifdef WIN32 | ||
|
||
bool dumpCallback(const wchar_t* dump_path, const wchar_t* minidump_id, void* context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion, bool succeeded) { | ||
//TCHAR* text = new TCHAR[kMaximumLineLength]; | ||
//text[0] = _T('\0'); | ||
//int result = swprintf_s(text, | ||
// kMaximumLineLength, | ||
// TEXT("Dump generation request %s\r\n"), | ||
// succeeded ? TEXT("succeeded") : TEXT("failed")); | ||
//if (result == -1) { | ||
// delete [] text; | ||
//} | ||
|
||
//QueueUserWorkItem(AppendTextWorker, text, WT_EXECUTEDEFAULT); | ||
|
||
if (succeeded) { | ||
fprintf(stderr, "Crash detected, MiniDump written to: %ls\n", dump_path); | ||
} else { | ||
fprintf(stderr, "Crash detected, failed to write MiniDump. (path: %ls)\n", dump_path); | ||
} | ||
return succeeded; | ||
} | ||
|
||
#else | ||
// linux | ||
|
||
bool dumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void*, bool succeeded) { | ||
fprintf(stderr, "Crash detected, MiniDump written to: %s\n", descriptor.path()); | ||
if (succeeded) { | ||
fprintf(stderr, "Crash detected, MiniDump written to: %s\n", descriptor.path()); | ||
} else { | ||
fprintf(stderr, "Crash detected, failed to write MiniDump. (path: %s)\n", descriptor.path()); | ||
} | ||
return succeeded; | ||
} | ||
|
||
// endif linux | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters