Argumentbreakpoint modify --condition takes a C ++ expression, evaluates it when a breakpoint is hit, and if the result is non-zero (true), the breakpoint stops.
(lldb) br s -n foo
Breakpoint 1: where = a.out`foo, address = 0x00001f30
(lldb) br mod -c '*(int*) ($esp+4) == 10'
(lldb) r
Process 11102 launched: '/private/tmp/a.out' (i386)
Process 11102 stopped
* thread #1: tid = 0x42c6f9, 0x00001f30 a.out`foo, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1
a.out`foo:
-> 0x1f30: pushl %ebp
0x1f31: movl %esp, %ebp
0x1f33: pushl %eax
0x1f34: movl 8(%ebp), %eax
(lldb) x/x $esp+4
0xbffffbf0: 0x0000000a
(lldb)
The bracket around $esp+4is to preserve pointer arithmetic from size-of- int *. Without these brackets, the expression will dereference $esp+16.
, (x86_64, armv7, arm64 ), lldb , $arg1, $arg2 .., .