0

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

Eduardo Reis
  • 1,691
  • 1
  • 22
  • 45
  • 1
    See the slider in the bottom left corner of the screen? Slide it all the way to the right to see the full stack traces. – rmaddy Dec 03 '13 at 23:52
  • in this case you can very plainly see that your program is aborting due to an assertion failure in templmatch.cpp line 70... it says that right in your console! – Brad Allred Dec 04 '13 at 00:00
  • @rmaddy, thanks for that comment. Very useful. But sliding that bar it just allow me to see up to 15 calls on the stack. Is there a way to see the whole trace from that up to my code? – Eduardo Reis Dec 04 '13 at 00:43

1 Answers1

3

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.

mah
  • 39,056
  • 9
  • 76
  • 93