On Nov 1, 2012, at 3:44 PM, Sebastien Boisvert wrote:

> I have an IMP for a method - in Xcode debugging window, I can select the var, 
> and make it display a description; I get something like this in the console:
> 
> (IMP) ImpVarName = 0x00000001012a1130 (FrameWorkName`-[ClassName methodName] 
> at ClassName.m:125)
> 
> This is perfect, but I can't figure out how to get this logged out (through 
> NSLog or otherwise) through code. Any ideas?

There's no description inherent to the IMP.  As far as the running app is 
concerned, an IMP is just an address.  The debugger is looking up the symbol 
associated with the address in the debugging information.  This will typically 
not be available to the release build of an app in the wild.

You can try to use the dladdr() function or invoke the "atos" tool, but be sure 
to test that in your intended deployment environment -- that is, off of your 
development machine -- to get representative behavior.

Regards,
Ken


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to