Conditional breakpoint in lldb according to value in memory? -


What is the syntax to set a conditional breakpoint in lldb according to a value in memory?

something like:

Breakpoint -c modified "memory read -Gx $ esp 4 == 0"

Alternatively I think I can set a breakpoint command if the situation I am to continue to be false, but I failed to find the syntax for it :)

breakpoint improvement takes 's - condition argument is a C + + expression, it evaluates the breakpoint hit Gets it, and if Inam is zero (true), breakpoint stops

  (lldb) br s -n foo Breakpoint 1 :. Where = a.out`foo, address = 0x00001f30 (lldb) br modern -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, in closed line =' Com.apple.main-thread, = breakpoint 1.1 # 0: 0x 00001f30 a.out`foo a.out`foo: - & gt; 0xlf30: Pushl% EBP 0x1f31: movl% esp,% EBP 0xlf33: Pushl% Eax 0xlf34: Movl 8 (% EBP),% eax (lldb) x / x $ esp 4 0xbffffbf0: 0x0000000a (lldb)   There is bracket around  $ esp + 4  to keep the pointer arithmetic from size-of- int *  without those cathars, the expression will be different  $ Esp + 16 . 

The facility register at the platforms where logic registers (x86_64, ARMv7, arm64 for some number of logic), lldb offers are passed on register register, $ arg1 , < Code> $ arg2 , etc. These types of breakpoints are easy for situations.


Comments