{"id":7039,"date":"2013-02-27T17:29:27","date_gmt":"2013-02-27T22:29:27","guid":{"rendered":"http:\/\/mjtsai.com\/blog\/?p=7039"},"modified":"2023-10-16T16:55:05","modified_gmt":"2023-10-16T20:55:05","slug":"application-specific-crash-report-information","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2013\/02\/27\/application-specific-crash-report-information\/","title":{"rendered":"Application Specific Crash Report Information"},"content":{"rendered":"<p><a href=\"https:\/\/gist.github.com\/ccgus\/5020894\">Wil Shipley<\/a> 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&rsquo;s <a href=\"http:\/\/www.opensource.apple.com\/source\/configd\/configd-453.16\/SystemConfiguration.fproj\/SCDPrivate.c?txt\">source for configd<\/a>:<\/p>\n<blockquote cite=\"http:\/\/www.opensource.apple.com\/source\/configd\/configd-453.16\/SystemConfiguration.fproj\/SCDPrivate.c?txt\"><pre>\/* CrashReporter info *\/\nconst char *__crashreporter_info__ = NULL;\nasm(\".desc ___crashreporter_info__, 0x10\");<\/pre><\/blockquote>\n<p>I also like to use <code>-[NSThread setName:]<\/code>.<\/p>\n<p>Update (2013-05-03): <a href=\"http:\/\/www.mikeash.com\/pyblog\/friday-qa-2013-05-03-proper-use-of-asserts.html\">Mike Ash<\/a> adds this to his assertion macro.<\/p>\n<p>Update (2014-02-18): <a href=\"https:\/\/opensource.plausible.coop\/bugs\/browse\/PLCR-527\">PLCrashReporter developers<\/a> consider whether they should read from <code>__crashreporter_info__<\/code> (via <a href=\"https:\/\/twitter.com\/landonfuller\/status\/435820785522192384\">Landon<\/a> <a href=\"https:\/\/twitter.com\/landonfuller\/status\/435821945259847680\">Fuller<\/a>).<\/p>","protected":false},"excerpt":{"rendered":"<p>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&rsquo;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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-10-16T20:55:07Z","apple_news_api_id":"46aad7d0-3b3d-41c4-ab19-3fd01459a262","apple_news_api_modified_at":"2023-10-16T20:55:08Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/ARqrX0Ds9QcSrGT_QFFmiYg","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[69,2479,56,30,752,71],"class_list":["post-7039","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-cocoa","tag-crash-reporter","tag-debugging","tag-mac","tag-plcrashreporter","tag-programming"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=7039"}],"version-history":[{"count":5,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7039\/revisions"}],"predecessor-version":[{"id":40799,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/7039\/revisions\/40799"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=7039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=7039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=7039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}