How to print exception stack trace of Objective-C exceptions with GNU runtime and without GNUStep?
问题 I have an Objective-C app build on Linux with GCC 4.3 using no specific framework (only GNU-runtime). I am using Objective-C exceptions (via the '-fobjc-exceptions' compiler flag). Now I want to print the stack trace of such an exception when I caught some. Or what would make me even happier: put the trace in a string or some kind of structure to evaluate or print it later on. How can that be achieved? 回答1: NSArray * stack = [NSThread callStackSymbols]; It may help. 回答2: Since no more