Instantly share code, notes, and snippets.
C程序编译时,加上 -g 选项,然后运行命令进入调试:
-g
lldb [program] [argv]..
GDB commands with the LLDB counterparts
Run to breakpoint, Show the arguments and local variables for the current frame:
fr v
Show the local variables for the current frame:
fr v -a
Show the contents of local variable "bar".
p bar
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Evaluating a generalized expression in the current frame:
print (int) printf ("Print nine: %d.", 4 + 5)
Run to breakpoint, Show the arguments and local variables for the current frame:
Show the local variables for the current frame:
Show the contents of local variable "bar".