Objective-C message logging weirdness
Objective-C message logging weirdness
- Subject: Objective-C message logging weirdness
- From: David Hoerl <email@hidden>
- Date: Fri, 08 Jul 2005 11:57:49 -0400
I looked at the source for an objective-c runtime file:
http://darwinsource.opendarwin.org/10.3/objc4-235/runtime/objc-class.m
You can see there two non-static functions:
void instrumentObjcMessageSends (BOOL flag)
void logObjcMessageSends (ObjCLogProc logProc)
[I also downloaded the 10.4.1 source, and these files are the same.
For some reason you cannot get at the source for this release as
easily.]
if I use instrumentObjcMessageSends in my project, it builds and
links just fine (static not ZeroLink).
However, I get an unresolved reference to logObjcMessageSends.
What makes this second function so intriguing is that you can specify
your own logging function, which could also filter the output based
on programmatic runtime criteria.
From my read of the source, you would need to call both functions:
instrumentObjcMessageSends(YES);
logObjcMessageSends(myProc);
But, without the reference to logObjcMessageSends all is lost. What
one DOES get with the first function is a log of EVERY method/class
call. In a few seconds I got about 10Megs worth of data. Clearly a
filter here would be of great value.
Can anyone shed light on this?
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden