Files
UnrealEngineUWP/Engine/Source/Developer/CrashDebugHelper/Private/Windows/WindowsPlatformStackWalkExt.h
Jamie Dale 63a39cbf09 Added some missing PLATFORM_SUPPORTS_STACK_SYMBOLS defines
Some platforms that implement stack walking weren't setting this to true, and there was also no default for platforms that don't support stack walking.

This define is only used when building with bUseMallocProfiler turned on.

ReviewedBy Gil.Gribb
#platformnotify Josh.Adams

[CL 2700520 by Jamie Dale in Main branch]
2015-09-22 09:52:02 -04:00

66 lines
1.8 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
class FCrashInfo;
class FCrashModuleInfo;
/**
* Windows implementation of stack walking using the COM interface IDebugClient5.
*/
struct FWindowsPlatformStackWalkExt
{
/** Default constructor. */
FWindowsPlatformStackWalkExt( FCrashInfo& InCrashInfo );
/** Destructor. */
~FWindowsPlatformStackWalkExt();
/** Initializes the COM interface to grab stacks. */
bool InitStackWalking();
/** Shutdowns COM. */
void ShutdownStackWalking();
/** Sets the options we want for symbol lookup. */
void InitSymbols();
/** Grabs the branch relative path of the binary. */
static FString ExtractRelativePath( const TCHAR* BaseName, TCHAR* FullName );
/** Gets the exe file versions and lists all modules. */
void GetExeFileVersionAndModuleList( FCrashModuleInfo& out_ExeFileVersion );
/** Set the symbol paths based on the module paths. */
void SetSymbolPathsFromModules();
/** Gets detailed info about each module. */
void GetModuleInfoDetailed();
/** Check to see if the stack address resides within one of the loaded modules i.e. is it valid?. */
bool IsOffsetWithinModules( uint64 Offset );
/** Extract the system info of the crash from the minidump. */ // @TODO yrx 2015-02-24 Move to crash report client?
void GetSystemInfo();
/** Extracts the thread info from the minidump. */
void GetThreadInfo(){}
/** Extracts info about the exception that caused the crash. */
void GetExceptionInfo();
/**
* Gets the callstack of the crash.
*
* @return the number of valid function names
*/
int32 GetCallstacks();
/** Opens a minidump as a new session. */
bool OpenDumpFile( const FString& DumpFileName );
protected:
/** Reference to the crash info. */
FCrashInfo& CrashInfo;
};