Stack Traces

You can see a stack trace, that is, all of the currently active functions, with the where command (also backtrace and bt). It will show you the stack frames currently active:

(​g​d​b​)​ ​w​h​e​r​e​
#​0​ ​ ​0​x​0​0​0​0​7​f​f​f​8​2​f​7​a​1​2​0​ ​i​n​ ​s​t​r​l​e​n​ ​(​)​
#​1​ ​ ​0​x​0​0​0​0​7​f​f​f​8​2​f​8​5​b​1​c​ ​i​n​ ​_​_​v​f​p​r​i​n​t​f​ ​(​)​
#​2​ ​ ​0​x​0​0​0​0​7​f​f​f​8​2​f​c​6​d​c​b​ ​i​n​ ​v​f​p​r​i​n​t​f​_​l​ ​(​)​
#​3​ ​ ​0​x​0​0​0​0​7​f​f​f​8​2​f​f​4​4​8​3​ ​i​n​ ​p​r​i​n​t​f​ ​(​)​
#​4​ ​ ​0​x​0​0​0​0​0​0​0​1​0​0​0​0​0​d​e​c​ ​i​n​ ​m​a​i​n​ ​(​a​r​g​c​=​2​,​ ​a​r​g​v​=​0​x​7​f​f​f​5​f​b​f​f​2​4​0​)​ ​a​t​ ​m​e​m​e​r​r​o​r​.​m​:​8​2​

The bottom-most frame, main() in this case, is termed the innermost stack frame. The ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.