Wednesday, February 27, 2013 [Tweets] [Favorites]

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

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment