Re: Get the name of the method that called a method
Re: Get the name of the method that called a method
- Subject: Re: Get the name of the method that called a method
- From: Dave Keck <email@hidden>
- Date: Mon, 20 Apr 2009 21:12:19 -1000
Hey,
The first thing that comes to mind is throwing an exception, catching
it, then accessing the NSException's -callStackReturnAddresses. From
there, you'll need to turn the addresses into symbol names. I googled
it a little bit and found these references:
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man3/backtrace_symbols.3.html
http://www.restoroot.com/Blog/2008/10/18/crash-reporter-for-iphone-applications/
http://furbo.org/2008/08/08/symbolicatifination/
David
_______________________________________________
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