LLDB
A debugger! It has some cool features that GDB probably doesn’t have. Like in gui mode you can use arrows to expand/collapse nested structures! But gui in LLDB is mostly a hacked around thing. You can’t even run commands within it.
# General
lldb -- prog arg1 arg2
- passing arguments (or even without--
, dunno)b
to set breakpoints; usehelp b
for more inforun
orr
- run!n
,s
- next, step intoc
forcontinue
frame variable
orfr v
- print variables visible in the current frameframe select
orfr s
- print last selected frameframe select 2
orf 2
- select frames (0
is current frame,1
is next in the call stack and so on)bt
for backtracegui
orgu
orui
for gui
# Watchpoints
Prints the variable when it’s accessed or changed.
watchpoint set variable globalVar
watchpoint set variable -w read | write | read_write globalVar
w s v d.memberVar
- for local variables. Also shorter commands
# Terminating
kill
- kill the processquit
orq
orCTRLD + D
- quit