UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
WindowsPlatformStackWalk.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
7
13{
14 static CORE_API bool InitStackWalking();
16
17 static CORE_API TArray<FProgramCounterSymbolInfo> GetStack(int32 IgnoreCount, int32 MaxDepth = 100, void* Context = nullptr);
18
20
23 CORE_API FORCENOINLINE static uint32 CaptureStackBackTrace( uint64* BackTrace, uint32 MaxDepth, void* Context = nullptr ); // FORCENOINLINE so it can be counted during StackTrace
24 static CORE_API uint32 CaptureThreadStackBackTrace( uint64 ThreadId, uint64* BackTrace, uint32 MaxDepth, void* Context = nullptr);
25 CORE_API FORCENOINLINE static void StackWalkAndDump( ANSICHAR* HumanReadableString, SIZE_T HumanReadableStringSize, int32 IgnoreCount, void* Context = nullptr ); // FORCENOINLINE so it can be counted during StackTrace
26 static CORE_API void StackWalkAndDump( ANSICHAR* HumanReadableString, SIZE_T HumanReadableStringSize, void* ProgramCounter, void* Context = nullptr );
28
30 static CORE_API int32 GetProcessModuleSignatures(FStackWalkModuleInfo *ModuleSignatures, const int32 ModuleSignaturesSize);
31
33
42 static CORE_API bool UploadLocalSymbols();
43
47 static CORE_API FString GetDownstreamStorage();
48
49 static CORE_API void* MakeThreadContextWrapper(void* Context, void* ThreadHandle);
50 static CORE_API void ReleaseThreadContextWrapper(void* ThreadContext);
51
67
68protected:
70private:
71 static bool InitStackWalkingInternal(void* Process, bool bForceReinitOnProcessMismatch);
72};
73
74
#define FORCENOINLINE
Definition AndroidPlatform.h:142
FPlatformTypes::SIZE_T SIZE_T
An unsigned integer the same size as a pointer, the same as UPTRINT.
Definition Platform.h:1150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
FPlatformTypes::ANSICHAR ANSICHAR
An ANSI character. Normally a signed type.
Definition Platform.h:1131
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
FWindowsPlatformStackWalk FPlatformStackWalk
Definition WindowsPlatformStackWalk.h:75
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Array.h:670
Definition AssetRegistryState.h:50
Definition MicrosoftPlatformStackWalk.h:13
Definition AndroidPlatformProcess.h:13
Definition GenericPlatformStackWalk.h:76
Definition GenericPlatformStackWalk.h:43
Definition GenericPlatformStackWalk.h:21
Definition WindowsPlatformStackWalk.h:13
static CORE_API uint32 CaptureThreadStackBackTrace(uint64 ThreadId, uint64 *BackTrace, uint32 MaxDepth, void *Context=nullptr)
Definition WindowsPlatformStackWalk.cpp:302
static CORE_API void ReleaseThreadContextWrapper(void *ThreadContext)
Definition WindowsPlatformStackWalk.cpp:940
static CORE_API bool UploadLocalSymbols()
Definition WindowsPlatformStackWalk.cpp:595
CORE_API static FORCENOINLINE void StackWalkAndDump(ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, int32 IgnoreCount, void *Context=nullptr)
Definition WindowsPlatformStackWalk.cpp:125
CORE_API static FORCENOINLINE uint32 CaptureStackBackTrace(uint64 *BackTrace, uint32 MaxDepth, void *Context=nullptr)
Definition WindowsPlatformStackWalk.cpp:372
static CORE_API int32 GetProcessModuleCount()
Definition WindowsPlatformStackWalk.cpp:798
static CORE_API void * MakeThreadContextWrapper(void *Context, void *ThreadHandle)
Definition WindowsPlatformStackWalk.cpp:932
static CORE_API void ProgramCounterToSymbolInfoEx(uint64 ProgramCounter, FProgramCounterSymbolInfoEx &out_SymbolInfo)
Definition WindowsPlatformStackWalk.cpp:542
static CORE_API FString GetDownstreamStorage()
Definition WindowsPlatformStackWalk.cpp:917
static CORE_API void RegisterOnModulesChanged()
Definition WindowsPlatformStackWalk.cpp:1165
static CORE_API TArray< FProgramCounterSymbolInfo > GetStack(int32 IgnoreCount, int32 MaxDepth=100, void *Context=nullptr)
Definition WindowsPlatformStackWalk.cpp:154
static CORE_API bool InitStackWalkingForProcess(const FProcHandle &Process)
Definition WindowsPlatformStackWalk.cpp:1158
static CORE_API bool InitStackWalking()
Definition WindowsPlatformStackWalk.cpp:1150
static CORE_API void CaptureStackTraceByProcess(uint64 *OutBacktrace, uint32 MaxDepth, void *InContext, void *InThreadHandle, uint32 *OutDepth, bool bExternalProcess)
Definition WindowsPlatformStackWalk.cpp:285
static CORE_API void ProgramCounterToSymbolInfo(uint64 ProgramCounter, FProgramCounterSymbolInfo &out_SymbolInfo)
Definition WindowsPlatformStackWalk.cpp:439
static CORE_API bool GetFunctionDefinitionLocation(const FString &FunctionSymbolName, const FString &FunctionModuleName, FString &OutPathname, uint32 &OutLineNumber, uint32 &OutColumnNumber)
Definition WindowsPlatformStackWalk.cpp:1171
static CORE_API int32 GetProcessModuleSignatures(FStackWalkModuleInfo *ModuleSignatures, const int32 ModuleSignaturesSize)
Definition WindowsPlatformStackWalk.cpp:817
static CORE_API void EnumerateSymbolInfosForProgramCounter(uint64 ProgramCounter, bool bIncludeInlineFrames, TFunctionRef< void(FProgramCounterSymbolInfo &OutSymbolInfo)> Callback)
Definition WindowsPlatformStackWalk.cpp:445
static CORE_API void ThreadStackWalkAndDump(ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize, int32 IgnoreCount, uint32 ThreadId)
Definition WindowsPlatformStackWalk.cpp:168