Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get thread specific info in iOS crash report?

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?

like image 257
MikeN Avatar asked Aug 24 '11 04:08

MikeN


People also ask

How do I read iOS crash logs?

Locate Crash Reports and Memory Logs on the DeviceOpen the Analytics & Improvements section of Settings on the device. See Share analytics, diagnostics, and usage information with Apple. Tap Analytics Data. Locate the log for your app.

How can I get iOS device logs?

Connect your iOS to your computer with a USB or Lightning cable. Go to Window > Devices and select your device from the list. Click the "up" triangle at the bottom left of the right hand panel. All logs from all apps on the device will be displayed here.

What is Crash Reporter key on iPhone?

CrashReporter Key : An anonymized per-device identifier. Two reports from the same device contain identical values. This identifier is reset upon erasing the device. Beta Identifier : A unique identifier for the combination of the device and vendor of the crashed application.


1 Answers

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.

like image 131
Lio Avatar answered Oct 06 '22 00:10

Lio