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)bto set breakpoints; usehelp bfor more inforunorr- run!n,s- next, step intocforcontinueframe variableorfr v- print variables visible in the current frameframe selectorfr s- print last selected frameframe select 2orf 2- select frames (0is current frame,1is next in the call stack and so on)btfor backtraceguiorguoruifor gui
# Watchpoints
Prints the variable when it’s accessed or changed.
watchpoint set variable globalVarwatchpoint set variable -w read | write | read_write globalVarw s v d.memberVar- for local variables. Also shorter commands
# Terminating
kill- kill the processquitorqorCTRLD + D- quit