I'm using the following code to get crash reports from my iOS application:
void *frames[128];
int i,len = backtrace(frames, 128);
char **symbols = backtrace_symbols(frames,len);
NSMutableString *buffer = [[NSMutableString alloc] initWithCapacity:4096];
NSBundle *bundle = [NSBundle mainBundle];
[buffer appendFormat:@"PComp version %@ build %@\n\n",
[bundle objectForInfoDictionaryKey:@"CFBundleVersion"],
[bundle objectForInfoDictionaryKey:@"CIMBuildNumber"]];
[buffer appendString:@"Uncaught C++ Exception\n"];
[buffer appendString:@"Stack trace:\n\n"];
for (i = 0; i < len; ++i) {
[buffer appendFormat:@"%4d - %s\n",i,symbols[i]];
}
This will only give information about the current thread? How could I get this stack trace for all threads?