Clone this repo:

Branches

  1. 4fbc827 Internal change by Googler ยท 4 years, 1 month ago master

A lightweight stack trace logging facility library for iOS.

Only support X86_64 and ARM64 architectures at the moment

Code Example

Get stack trace of any thread

// Buffer can be filled with up to 128 stack frames.
void *buffer[128];
int count = LPSnapshotThreadStackTrace(buffer, sizeof(buffer), anyThread);

// Get string representaion of the stack trace.
NSArray<NSString *> *result = LPStackTraceString(buffer, count);

Get stack traces of all threads

// Buffer can be filled with up to 40 threads.
LPThreadStackTrace buffer[40];
int count = LPSnapshotAllThreadsStackTrace(buffer, sizeof(buffer));

// Get string representaion of the stack trace.
NSArray<NSArray<NSString *> *> *result = LPStackTracesString(buffer, count);