• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Anyone able to get __crashreporter_info__ to work on iOS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Anyone able to get __crashreporter_info__ to work on iOS?


  • Subject: Anyone able to get __crashreporter_info__ to work on iOS?
  • From: Chris Markle <email@hidden>
  • Date: Wed, 27 Feb 2013 16:52:52 -0800

In "Application Specific Crash Report Information"
(http://mjtsai.com/blog/2013/02/27/application-specific-crash-report-information/)
Michael Tsai notes:

* * * his comments * * *
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:].
* * * end of his comments * * *

I tried this on iOS and did not see any change to a crash report, at
least when the crash report is viewed in Xcode Organizer > Device
Logs.

I basically made a single view iOS project and had this as my ViewController.m:

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

// Do any additional setup after loading the view, typically from a nib.

    [self addCrashreporterInfo];
    [self crash];
}

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

- (void)addCrashreporterInfo
{
    __crashreporter_info__ = "TestApp 1.0.0";
}

- (void)crash
{
    char *addr = 0;
    *addr = 1;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

Anyone have any success using this on technique to annotate crash
reports on iOS?

Chris

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Anyone able to get __crashreporter_info__ to work on iOS?
      • From: Greg Parker <email@hidden>
  • Prev by Date: Re: 2 icons showing in dock
  • Next by Date: Re: Anyone able to get __crashreporter_info__ to work on iOS?
  • Previous by thread: Re: Convention for init with error
  • Next by thread: Re: Anyone able to get __crashreporter_info__ to work on iOS?
  • Index(es):
    • Date
    • Thread