Wednesday, February 27, 2013

Application Specific Crash Report Information

Wil Shipley shows how an application can add information to a crash log by assigning to a special string variable. I see the same technique used in Apple’s source for configd:

/* CrashReporter info */
const char *__crashreporter_info__ = NULL;
asm(".desc ___crashreporter_info__, 0x10");

I also like to use -[NSThread setName:].

Update (2013-05-03): Mike Ash adds this to his assertion macro.

Update (2014-02-18): PLCrashReporter developers consider whether they should read from __crashreporter_info__ (via Landon Fuller).

Comments RSS · Twitter

Leave a Comment