C程序编译时,加上 -g
选项,然后运行命令进入调试:
lldb [program] [argv]..
C程序编译时,加上 -g
选项,然后运行命令进入调试:
lldb [program] [argv]..
Set a breakpoint in file test.c at line 12:
b test.c:12
List all breakpoints:
br l
Delete a breakpoint:
br del 1
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
Evaluating a generalized expression in the current frame:
print (int) printf ("Print nine: %d.", 4 + 5)
Show the arguments that will be or were passed to the program when run: