Re: Understanding the inner workings: getting to know how functions are called
Re: Understanding the inner workings: getting to know how functions are called
- Subject: Re: Understanding the inner workings: getting to know how functions are called
- From: Bill Bumgarner <email@hidden>
- Date: Tue, 22 Jan 2008 08:33:06 -0800
On Jan 22, 2008, at 8:05 AM, Mattias Arrelid wrote:
Hi everyone,
Sometimes when I subclass an existing Cocoa class, I wonder how its
methods are called; when in time, from what other function (possible
from another instance of another class) etc.
The "idiot" way of implementing this could of course be to add _all_
method names of the class in question and then just call [super
methodName] in each method, and then use some debug macro before and
after that call that prints the name of the method in question. That
really isn't that productive and seems like a waste of time.
Dtrace is likely a good place to start. For invocation order, you
can use the method resolving features in Leopard to build something
like what you want.
I wrote some articles on tracing method invocations sent to Nil.
Shouldn't be hard to modify to do what you describe.
http://www.friday.com/bbum/category/science/technology/objective-c/
b.bum
_______________________________________________
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