Examining the call stack

Saturday, December 25 2004 @ 04:07 PM UTC

Contributed by: cocoa

How can I exam the call stack programatically to find out which object's method called another method?

There are at least 3 ways to get a stack call from an Objective-C application:
- use the NSException mechanism;
- launch an "atos" task;
- use Mach-O routines to look inside code segment.
You put here an example to demonstrate the techniques.