Set a watchpoint on a variable when it is written to.
(lldb) watchpoint set variable global_var
(lldb) wa s v global_var
Set a watchpoint on a memory location when it is written into.
(lldb) watchpoint set expression -- my_ptr
(lldb) wa s e -- my_ptr
Set a condition on a watchpoint.
(lldb) watch set var global
(lldb) watchpoint modify -c '(global==5)'
(lldb) c
List all watchpoints.
(lldb) watchpoint list
(lldb) watch l
Delete a watchpoint.
(lldb) watchpoint delete 1
(lldb) watch del 1
(lldb) watchpoint set variable global_var
(lldb) wa s v global_var
Set a watchpoint on a memory location when it is written into.
(lldb) watchpoint set expression -- my_ptr
(lldb) wa s e -- my_ptr
Set a condition on a watchpoint.
(lldb) watch set var global
(lldb) watchpoint modify -c '(global==5)'
(lldb) c
List all watchpoints.
(lldb) watchpoint list
(lldb) watch l
Delete a watchpoint.
(lldb) watchpoint delete 1
(lldb) watch del 1