DaidalosCheung / EmacsNote

0 stars 0 forks source link

LLDB #3

Open DaidalosCheung opened 4 years ago

DaidalosCheung commented 4 years ago

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