NSLog a No-Op Probably Explained
NSLog a No-Op Probably Explained
- Subject: NSLog a No-Op Probably Explained
- From: Thomas Wetmore <email@hidden>
- Date: Sun, 20 Dec 2009 00:18:09 -0500
Xcoders,
My previous request held incorrect info. NSLog is not a macro, so it can't be compiled out. Red herring based on ignorance, nay to be honest, stupidity.
After another hour of experimentation I believe I have the explanation of why some of my calls to NSLog do not print anything. If this is a well-known phenomenon I apologize.
It appears that NSLog does not allow "recursive" calls, that is, if you call NSLog and the evaluation of one of its arguments ALSO causes calls NSLog, the deeper calls are essentially ignored. I don't know how to prove this definitively but it is the case that the deeper calls to NSLog do indeed call dyld_stub_NSLog, but instead of dyld_stub_NSLog doing anything real, it returns immediately.
(I had NSLog calls inside a class's description method; these calls did not work when the description method was called within the context of another NSLog. However, when the description method is called outside the context of an NSLog call the NSlog calls in the description method work fine.)
My great inexperience with Mac OS X development is a poor excuse, but I don't know yet how to single step within the assembly code of system framework code, else I believe I could prove this.
Tom Wetmore, Chief Bottle Washer, DeadEnds Software _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden