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:
(gdb) where
#0 0x00007fff82f7a120 in strlen ()
#1 0x00007fff82f85b1c in __vfprintf ()
#2 0x00007fff82fc6dcb in vfprintf_l ()
#3 0x00007fff82ff4483 in printf ()
#4 0x0000000100000dec in main (argc=2, argv=0x7fff5fbff240) at memerror.m:82
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.