Get thread specific info in iOS crash report?
Asked Answered
A

2

9

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?

Aftershaft answered 24/8, 2011 at 4:20 Comment(0)
R
4

Take a look at this question.

How To Loop Through All Active Thread in iPad app

The most voted response actually explains what you need to do.

Rinehart answered 25/8, 2011 at 16:32 Comment(0)
B
0

Have you tried using ATOS? (Address to symbol)

Bodyguard answered 8/9, 2011 at 5:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.