How to "back trace" called functions on XCode

3.9k views Asked by At

I can't figure out exactly where my code is crashing. It doesn't happen always. So, I guess that it would be very useful to check the callstack. But on XCode I can just see the these very low level callings. I can't reach any things that points to the last "upper level" call (I mean, from my code).

enter image description here

1

There are 1 answers

0
mah On BEST ANSWER

It looks like you typed the command "(gdb) backtrace"... you must have copied that from somewhere; the "(gdb)" portion is not part of the command to type, it was the prompt from gdb, similar to the (lldb) prompt you see on your screen.

That being said, the command to obtain the backtrace is "bt". You also have the backtrace shown in Xcode; each "Thread X" entry contains its backtrace and you can click on any entry in there to jump to that piece of code.