[MiniDump] Added 2 new flags: "bigminidump" and "reallybigminidumps" that dump code segments and code + data segments respectively. tell the testers to use them
This commit is contained in:
parent
8270040aab
commit
a19c98dfca
@ -3,6 +3,7 @@
|
|||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
Utils::Hook Exception::SetFilterHook;
|
Utils::Hook Exception::SetFilterHook;
|
||||||
|
int Exception::MiniDumpType;
|
||||||
|
|
||||||
__declspec(noreturn) void Exception::ErrorLongJmp(jmp_buf _Buf, int _Value)
|
__declspec(noreturn) void Exception::ErrorLongJmp(jmp_buf _Buf, int _Value)
|
||||||
{
|
{
|
||||||
@ -23,7 +24,7 @@ namespace Components
|
|||||||
return EXCEPTION_CONTINUE_EXECUTION;
|
return EXCEPTION_CONTINUE_EXECUTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto minidump = MinidumpUpload::CreateQueuedMinidump(ExceptionInfo);
|
auto minidump = MinidumpUpload::CreateQueuedMinidump(ExceptionInfo, Exception::MiniDumpType);
|
||||||
if (!minidump)
|
if (!minidump)
|
||||||
{
|
{
|
||||||
OutputDebugStringA("Failed to create new minidump!");
|
OutputDebugStringA("Failed to create new minidump!");
|
||||||
@ -61,8 +62,34 @@ namespace Components
|
|||||||
return SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
|
return SetUnhandledExceptionFilter(&Exception::ExceptionFilter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Exception::SetMiniDumpType()
|
||||||
|
{
|
||||||
|
Exception::MiniDumpType = MiniDumpIgnoreInaccessibleMemory;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithUnloadedModules;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithThreadInfo;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithFullMemoryInfo;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithHandleData;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithTokenInformation;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithProcessThreadData;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithFullAuxiliaryState;
|
||||||
|
|
||||||
|
if (Flags::HasFlag("bigminidumps"))
|
||||||
|
{
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithModuleHeaders;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithCodeSegs;
|
||||||
|
}
|
||||||
|
else if (Flags::HasFlag("reallybigminidumps"))
|
||||||
|
{
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithModuleHeaders;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithCodeSegs;
|
||||||
|
Exception::MiniDumpType |= MiniDumpWithDataSegs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Exception::Exception()
|
Exception::Exception()
|
||||||
{
|
{
|
||||||
|
SetMiniDumpType();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
// Display DEBUG branding, so we know we're on a debug build
|
// Display DEBUG branding, so we know we're on a debug build
|
||||||
Renderer::OnFrame([]()
|
Renderer::OnFrame([]()
|
||||||
|
@ -13,6 +13,9 @@ namespace Components
|
|||||||
#endif
|
#endif
|
||||||
static LPTOP_LEVEL_EXCEPTION_FILTER Hook();
|
static LPTOP_LEVEL_EXCEPTION_FILTER Hook();
|
||||||
|
|
||||||
|
static int MiniDumpType;
|
||||||
|
static void SetMiniDumpType();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo);
|
static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS ExceptionInfo);
|
||||||
static LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilterStub(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
|
static LPTOP_LEVEL_EXCEPTION_FILTER WINAPI SetUnhandledExceptionFilterStub(LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter);
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "STDInclude.hpp"
|
#include "STDInclude.hpp"
|
||||||
#include "Shlwapi.h"
|
#include "Shlwapi.h"
|
||||||
|
|
||||||
const int MiniDumpTiny = MiniDumpIgnoreInaccessibleMemory | /*MiniDumpWithModuleHeaders |*/ MiniDumpWithUnloadedModules | MiniDumpWithThreadInfo | MiniDumpWithFullMemoryInfo | MiniDumpWithHandleData | MiniDumpWithTokenInformation | MiniDumpWithProcessThreadData | MiniDumpWithFullAuxiliaryState;
|
|
||||||
|
|
||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#pragma comment(lib, "dbghelp.lib")
|
#pragma comment(lib, "dbghelp.lib")
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
|
|
||||||
extern const int MiniDumpTiny;
|
|
||||||
|
|
||||||
namespace Components
|
namespace Components
|
||||||
{
|
{
|
||||||
// This class holds a Minidump and allows easy access to its aspects.
|
// This class holds a Minidump and allows easy access to its aspects.
|
||||||
@ -16,7 +14,7 @@ namespace Components
|
|||||||
public:
|
public:
|
||||||
~Minidump();
|
~Minidump();
|
||||||
|
|
||||||
static Minidump* Create(std::string path, LPEXCEPTION_POINTERS exceptionInfo, int type = MiniDumpTiny);
|
static Minidump* Create(std::string path, LPEXCEPTION_POINTERS exceptionInfo, int type);
|
||||||
static Minidump* Open(std::string path);
|
static Minidump* Open(std::string path);
|
||||||
bool GetStream(MINIDUMP_STREAM_TYPE type, PMINIDUMP_DIRECTORY* directoryPtr, PVOID* streamPtr, ULONG* streamSizePtr);
|
bool GetStream(MINIDUMP_STREAM_TYPE type, PMINIDUMP_DIRECTORY* directoryPtr, PVOID* streamPtr, ULONG* streamSizePtr);
|
||||||
bool Check();
|
bool Check();
|
||||||
@ -46,7 +44,7 @@ namespace Components
|
|||||||
static bool Upload(Minidump* minidump);
|
static bool Upload(Minidump* minidump);
|
||||||
|
|
||||||
// Generates a new minidump and saves it to the folder for queued minidumps.
|
// Generates a new minidump and saves it to the folder for queued minidumps.
|
||||||
static Minidump* CreateQueuedMinidump(LPEXCEPTION_POINTERS exceptionInfo, int minidumpType = MiniDumpTiny);
|
static Minidump* CreateQueuedMinidump(LPEXCEPTION_POINTERS exceptionInfo, int minidumpType);
|
||||||
|
|
||||||
// Browses the folder for queued minidumps and uploads each queued minidump.
|
// Browses the folder for queued minidumps and uploads each queued minidump.
|
||||||
// On Release builds this will also delete every successfully uploaded minidump.
|
// On Release builds this will also delete every successfully uploaded minidump.
|
||||||
|
Loading…
Reference in New Issue
Block a user