Open DaidalosCheung opened 4 years ago
compile file.c with 0 level optimize, -g compile with debug information ?
run the a.out program
place a break point at main or line 8
run the next line, press Enter to repeat the last input, in this case is the n
print the variable's name, we can also use the command line "print [var]"
print out all variable
exit the debuger, and back to the terminal
LLDB command map
clang -O0 -g file.c
compile file.c with 0 level optimize, -g compile with debug information ?
lldb a.out
run the a.out program
b (main) (8)
place a break point at main or line 8
n
run the next line, press Enter to repeat the last input, in this case is the n
p [variable's name]
print the variable's name, we can also use the command line "print [var]"
fr v
print out all variable
exit
exit the debuger, and back to the terminal