0

I am trying to get the full stack trace by using the solution here: Xcode full stack trace

But I keep getting the following error:

(lldb) NSLog(@"Stack trace : %@",[NSThread callStackSymbols])
error: 'NSLog' is not a valid command.
error: Unrecognized command 'NSLog(@Stack trace : %@,[NSThread'.

What is causing this?

Community
  • 1
  • 1
JobHunter69
  • 1,706
  • 5
  • 25
  • 49

1 Answers1

0

In (lldb), you can try bt command. NSLog is for Objective-C code.

Hao Xi
  • 351
  • 4
  • 12
  • Yeah I am writing c++, but do you have a full command for that? – JobHunter69 Sep 28 '16 at 12:25
  • @Goldname As I know, in your Xcode console (i.e. lldb), you can input `bt` to get the stack trace of current thread (where your break point hit), and also you can input `bt all` to print stack trace of all threads. I think it is same for C++ or Objective-C as both are compiled by Apple's LLVM. – Hao Xi Sep 29 '16 at 05:42