Re: Stack Trace without /usr/bin/atos
Re: Stack Trace without /usr/bin/atos
- Subject: Re: Stack Trace without /usr/bin/atos
- From: James Bucanek <email@hidden>
- Date: Tue, 27 Feb 2007 08:59:08 -0700
Sanford Selznick wrote on Monday, February 26, 2007:
>I have two users in the field that are throwing an exception from
>deep inside a framework. I can't make the exception happen on any
>machine I have.
>
>I'd like to get a stack trace out of the exception's userInfo
>NSStackTraceKey using atos, but these users do not have developer
>tools (and thus no atos) installed. All I get back is a bunch of
>addresses.
The users don't need atos, and atos won't alter the information in the stack trace. The stack trace is generated by the CrashReporter which uses whatever debugging information is present in the executable that's loaded. If the executable has no symbol information, only hex addresses are recorded. The presense, or absence, of developer tools won't change this in any way.
>When I take these addresses and run them through atos on my machine
>with the same binary and architecture, the results are seemingly
>random.
The problem is that you need to offset the location by the base address of the library when it is loaded. The code for applications loads at the same, fixed, address every time. So you can feed atos unadjusted code addresses for applications. But libraries are relocated to other addresses as they loaded, and of course that's going to be different every system. You'll need to examine the library portion of the crash report to find out the base address of your library. Then offset the addresses when using atos.
This is explained in tech note 2123 "CrashReporter": <http://developer.apple.com/technotes/tn2004/tn2123.html>
--
James Bucanek
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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