3

I am using an exception handler in my AppDelegate.

    NSSetUncaughtExceptionHandler(&HandleExceptions);

I can get the backtrace of the exception by using NSException's callStackSymbols

It gives the following details.

    0   CoreFoundation                      0x01cfe02e __exceptionPreprocess + 206
1   libobjc.A.dylib                     0x011e2e7e objc_exception_throw + 44
2   CoreFoundation                      0x01cb3b44 -[__NSArrayI objectAtIndex:] + 196
3   LogError                            0x000047c5 -[ViewController crashIt:] + 133
4   libobjc.A.dylib                     0x011f6705 -[NSObject performSelector:withObject:withObject:] + 77

and much more.

I can get the class name, method name from this. But I can't find the line number, where the exception raised actually. Is there a way to get the line number from the backtrace or somewhere else?

Ramaraj T
  • 5,184
  • 4
  • 35
  • 68
  • 1
    A similar question was posted some time ago: [Symbolicating iPhone App](http://stackoverflow.com/questions/1460892/symbolicating-iphone-app-crash-reports). [This answer](http://stackoverflow.com/a/4954949/737105) on that question should help you. – Gianluca Tranchedone Jun 20 '13 at 16:24
  • 1
    No, in that question someone get the crash report from iTunes. But I get the backtrace from NSException. i.e. in the code itself. – Ramaraj T Jun 21 '13 at 04:42

0 Answers0