UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AndroidPlatformStackWalk.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4/*=============================================================================================
5 AndroidPlatformStackWalk.h: Android platform stack walk functions
6==============================================================================================*/
7
8#pragma once
10
12{
13 std::atomic<int32> Flag; //0 or 1 to indicate if stack capture has been finished
15 static constexpr int StackTraceMaxDepth = 100;
18 static constexpr int MaxThreadName = 20;
20};
21
26{
28
30 static CORE_API uint32 CaptureStackBackTrace(uint64* BackTrace, uint32 MaxDepth, void* Context = nullptr);
31 // Fast stack backtrace, only for tracing.
32 // Will NOT work from signal handlers, is NOT suitable for crashreporting. Will not see inline functions.
35
36 static CORE_API uint32 CaptureThreadStackBackTrace(uint64 ThreadId, uint64* BackTrace, uint32 MaxDepth, void* Context = nullptr);
38
40
41 static CORE_API bool InitStackWalking();
42};
43
FAndroidPlatformStackWalk FPlatformStackWalk
Definition AndroidPlatformStackWalk.h:44
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
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition AndroidPlatformStackWalk.h:26
static CORE_API uint32 CaptureStackBackTrace(uint64 *BackTrace, uint32 MaxDepth, void *Context=nullptr)
Definition AndroidPlatformStackWalk.cpp:215
FGenericPlatformStackWalk Parent
Definition AndroidPlatformStackWalk.h:27
static CORE_API uint32 CaptureStackBackTraceViaFramePointerWalking(uint64 *BackTrace, uint32 MaxDepth)
Definition AndroidPlatformStackWalk.cpp:261
static CORE_API bool SymbolInfoToHumanReadableString(const FProgramCounterSymbolInfo &SymbolInfo, ANSICHAR *HumanReadableString, SIZE_T HumanReadableStringSize)
Definition AndroidPlatformStackWalk.cpp:329
static CORE_API int CaptureThreadStackBackTraceAsync(FAsyncThreadBackTrace *BackTrace)
static CORE_API void ProgramCounterToSymbolInfo(uint64 ProgramCounter, FProgramCounterSymbolInfo &out_SymbolInfo)
Definition AndroidPlatformStackWalk.cpp:98
static CORE_API void HandleBackTraceSignal(siginfo *Info, void *Context)
static CORE_API bool InitStackWalking()
Definition AndroidPlatformStackWalk.cpp:49
static CORE_API uint32 CaptureThreadStackBackTrace(uint64 ThreadId, uint64 *BackTrace, uint32 MaxDepth, void *Context=nullptr)
Definition AndroidPlatformStackWalk.cpp:519
Definition AndroidPlatformStackWalk.h:12
static constexpr int MaxThreadName
Definition AndroidPlatformStackWalk.h:18
char ThreadName[MaxThreadName]
Definition AndroidPlatformStackWalk.h:19
uint64 BackTrace[StackTraceMaxDepth]
Definition AndroidPlatformStackWalk.h:16
int32 Depth
Definition AndroidPlatformStackWalk.h:14
static constexpr int StackTraceMaxDepth
Definition AndroidPlatformStackWalk.h:15
std::atomic< int32 > Flag
Definition AndroidPlatformStackWalk.h:13
uint32 ThreadID
Definition AndroidPlatformStackWalk.h:17
Definition GenericPlatformStackWalk.h:106
Definition GenericPlatformStackWalk.h:43