tree: a3a45855c8efa0a4adf352d99c7eb6fa6cb18de5 [path history] [tgz]
  1. LICENSE
  2. LPStackTraceGenerator.h
  3. LPStackTraceGenerator.m
  4. README.md
README.md

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);