#include <GenericPlatformStackWalk.h>
|
static void | Init () |
|
static bool | InitStackWalking () |
|
static bool | InitStackWalkingForProcess (const FProcHandle &Process) |
|
static bool | ProgramCounterToHumanReadableString (int32 CurrentCallDepth, uint64 ProgramCounter, ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, FGenericCrashContext *Context=nullptr) |
|
static bool | SymbolInfoToHumanReadableString (const FProgramCounterSymbolInfo &SymbolInfo, ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize) |
|
static bool | SymbolInfoToHumanReadableStringEx (const FProgramCounterSymbolInfoEx &SymbolInfo, FString &out_HumanReadableString) |
|
static void | ProgramCounterToSymbolInfo (uint64 ProgramCounter, FProgramCounterSymbolInfo &out_SymbolInfo) |
|
static void | ProgramCounterToSymbolInfoEx (uint64 ProgramCounter, FProgramCounterSymbolInfoEx &out_SymbolInfo) |
|
static uint32 | CaptureStackBackTrace (uint64 *BackTrace, uint32 MaxDepth, void *Context=nullptr) |
|
static uint32 | CaptureThreadStackBackTrace (uint64 ThreadId, uint64 *BackTrace, uint32 MaxDepth, void *Context=nullptr) |
|
static FORCENOINLINE void | StackWalkAndDump (ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, int32 IgnoreCount, void *Context=nullptr) |
|
static void | StackWalkAndDump (ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, void *ProgramCounter, void *Context=nullptr) |
|
static TArray< FProgramCounterSymbolInfo > | GetStack (int32 IgnoreCount, int32 MaxDepth=100, void *Context=nullptr) |
|
static void | ThreadStackWalkAndDump (ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, int32 IgnoreCount, uint32 ThreadId) |
|
static void | StackWalkAndDumpEx (ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, int32 IgnoreCount, uint32 Flags, void *Context=nullptr) |
|
static void | StackWalkAndDumpEx (ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, void *ProgramCounter, uint32 Flags, void *Context=nullptr) |
|
static FORCEINLINE int32 | GetProcessModuleCount () |
|
static FORCEINLINE int32 | GetProcessModuleSignatures (FStackWalkModuleInfo *ModuleSignatures, const int32 ModuleSignaturesSize) |
|
static TMap< FName, FString > | GetSymbolMetaData () |
|
Generic implementation for most platforms
Definition at line 105 of file GenericPlatformStackWalk.h.
◆ Base
◆ CaptureStackBackTrace()
Capture a stack backtrace and optionally use the passed in exception pointers.
- Parameters
-
BackTrace | [out] Pointer to array to take backtrace |
MaxDepth | Entries in BackTrace array |
Context | Optional thread context information |
◆ CaptureThreadStackBackTrace()
Capture a stack backtrace for a specific thread.
- Parameters
-
ThreadId | ID of the thread to trace |
BackTrace | [out] Pointer to array to take backtrace |
MaxDepth | Entries in BackTrace array |
Context | Optional thread context information |
◆ GetProcessModuleCount()
◆ GetProcessModuleSignatures()
Gets the signature for every module loaded by the currently running process.
- Parameters
-
ModuleSignatures | An array to retrieve the module signatures. |
ModuleSignaturesSize | The size of the array pointed to by ModuleSignatures. |
- Returns
- The number of modules copied into ModuleSignatures
Definition at line 313 of file GenericPlatformStackWalk.h.
◆ GetStack()
Walks the stack and updates the Stack array with the symbol information for each line in the stack.
- Parameters
-
IgnoreCount | Number of stack entries to ignore (some are guaranteed to be in the stack walking code) |
MaxDepth | The maximum depth to trace, can't be more than 100, offset from IgnoreCount. |
Context | Optional thread context information |
- Returns
- The stack of symbols to return.
◆ GetSymbolMetaData()
Gets the meta-data associated with all symbols of this target. This may include things that are needed to perform further offline processing of symbol information (eg, the source binary).
- Returns
- A map containing the meta-data (if any).
◆ Init()
Initializes options related to stack walking from ini, i.e. how detailed the stack walking should be, performance settings etc.
◆ InitStackWalking()
static bool FGenericPlatformStackWalk::InitStackWalking |
( |
| ) |
|
|
inlinestatic |
Initializes stack traversal and symbol. Must be called before any other stack/symbol functions. Safe to reenter.
Definition at line 132 of file GenericPlatformStackWalk.h.
◆ InitStackWalkingForProcess()
Like InitStackWalking but initializes stack walking for another process.
- Parameters
-
Process | Process that is going to be queried |
- Returns
- True if successful, false otherwise.
Definition at line 142 of file GenericPlatformStackWalk.h.
◆ ProgramCounterToHumanReadableString()
Converts the passed in program counter address to a human readable string and appends it to the passed in one.
- Warning
- : The code assumes that HumanReadableString is large enough to contain the information.
-
: Please, do not override this method. Can't be modified or altered without notice.
This method is the same for all platforms to simplify parsing by the crash processor.
Example formatted line:
UE4Editor_Core!FOutputDeviceWindowsErrorSerialize() (0xddf1bae5) + 620 bytes [\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:110] ModuleName!FunctionName (ProgramCounter) + offset bytes [StrippedFilepath:LineNumber]
- Parameters
-
CurrentCallDepth | Depth of the call, if known (-1 if not - note that some platforms may not return meaningful information in the latter case) |
ProgramCounter | Address to look symbol information up for |
HumanReadableString | String to concatenate information with |
HumanReadableStringSize | size of string in characters |
Context | Pointer to crash context, if any |
- Returns
- true if the symbol was found, otherwise false
◆ ProgramCounterToSymbolInfo()
Converts the passed in program counter address to a symbol info struct, filling in module and filename, line number and displacement.
- Warning
- : The code assumes that the destination strings are big enough
- Parameters
-
ProgramCounter | Address to look symbol information up for |
out_SymbolInfo | Symbol information associated with program counter |
Definition at line 198 of file GenericPlatformStackWalk.h.
◆ ProgramCounterToSymbolInfoEx()
Same as above, but can be used with external applications since it doesn't re-initialize the active process.
Definition at line 204 of file GenericPlatformStackWalk.h.
◆ StackWalkAndDump() [1/2]
Walks the stack and appends the human readable string to the passed in one.
- Warning
- : The code assumes that HumanReadableString is large enough to contain the information.
- Parameters
-
HumanReadableString | String to concatenate information with |
HumanReadableStringSize | size of string in characters |
IgnoreCount | Number of stack entries to ignore (some are guaranteed to be in the stack walking code) |
Context | Optional thread context information |
◆ StackWalkAndDump() [2/2]
static void FGenericPlatformStackWalk::StackWalkAndDump |
( |
ANSICHAR * | HumanReadableString, |
|
|
SIZE_T | HumanReadableStringSize, |
|
|
void * | ProgramCounter, |
|
|
void * | Context = nullptr ) |
|
static |
Walks the stack and appends the human readable string to the passed in one.
- Warning
- : The code assumes that HumanReadableString is large enough to contain the information.
- Parameters
-
HumanReadableString | String to concatenate information with |
HumanReadableStringSize | size of string in characters |
ProgramCounter | Instruction address that should be at the top of the stack |
Context | Optional thread context information |
◆ StackWalkAndDumpEx() [1/2]
Walks the stack and appends the human readable string to the passed in one.
- Warning
- : The code assumes that HumanReadableString is large enough to contain the information.
- Parameters
-
HumanReadableString | String to concatenate information with |
HumanReadableStringSize | size of string in characters |
IgnoreCount | Number of stack entries to ignore (some are guaranteed to be in the stack walking code) |
Flags | Used to pass additional information (see StackWalkFlags) |
Context | Optional thread context information |
◆ StackWalkAndDumpEx() [2/2]
static void FGenericPlatformStackWalk::StackWalkAndDumpEx |
( |
ANSICHAR * | HumanReadableString, |
|
|
SIZE_T | HumanReadableStringSize, |
|
|
void * | ProgramCounter, |
|
|
uint32 | Flags, |
|
|
void * | Context = nullptr ) |
|
static |
Walks the stack and appends the human readable string to the passed in one.
- Warning
- : The code assumes that HumanReadableString is large enough to contain the information.
- Parameters
-
HumanReadableString | String to concatenate information with |
HumanReadableStringSize | size of string in characters |
ProgramCounter | Instruction address that should be at the top of the stack |
Flags | Used to pass additional information (see StackWalkFlags) |
Context | Optional thread context information |
◆ SymbolInfoToHumanReadableString()
Converts the passed in symbol information to a human readable string and appends it to the passed in one.
- Warning
- : The code assumes that HumanReadableString is large enough to contain the information.
-
: Please, do not override this method. Can't be modified or altered without notice.
This method is the same for all platforms to simplify parsing by the crash processor.
Example formatted line:
UE4Editor_Core!FOutputDeviceWindowsErrorSerialize() (0xddf1bae5) + 620 bytes [\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:110] ModuleName!FunctionName (ProgramCounter) + offset bytes [StrippedFilepath:LineNumber]
- Parameters
-
SymbolInfo | Symbol information |
HumanReadableString | String to concatenate information with |
HumanReadableStringSize | size of string in characters |
Context | Pointer to crash context, if any |
- Returns
- true if the symbol was found, otherwise false
◆ SymbolInfoToHumanReadableStringEx()
Same as above, but can be used with external applications.
◆ ThreadStackWalkAndDump()
static void FGenericPlatformStackWalk::ThreadStackWalkAndDump |
( |
ANSICHAR * | HumanReadableString, |
|
|
SIZE_T | HumanReadableStringSize, |
|
|
int32 | IgnoreCount, |
|
|
uint32 | ThreadId ) |
|
inlinestatic |
Walks the stack for the specified thread and appends the human readable string to the passed in one.
- Warning
- : The code assumes that HumanReadableString is large enough to contain the information.
- Parameters
-
HumanReadableString | String to concatenate information with |
HumanReadableStringSize | size of string in characters |
IgnoreCount | Number of stack entries to ignore (some are guaranteed to be in the stack walking code) |
ThreadId | ThreadId to walk the strack for. |
Definition at line 270 of file GenericPlatformStackWalk.h.
◆ WantsDetailedCallstacksInNonMonolithicBuilds()
static bool FGenericPlatformStackWalk::WantsDetailedCallstacksInNonMonolithicBuilds |
( |
| ) |
|
|
staticprotected |
Returns true if non-monolithic builds should produce full callstacks in the log (and load all debug symbols)
The documentation for this struct was generated from the following file: