O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required