While debugging with lldb a macOS application, is it possible to watch the contents of a register for changes with a watchpoint ? I mean not the memory to which the address contained in the register points to, but the contents of the register itself, for example from 0x000000000 to 0x000000001 ? Thanks a lot for your help.
I don't think there's any way to get the processor to trap when a particular register changes value. In any case, not one that lldb has access to.
Short of that, you'd have to instruction-single-step and check the value on each stop. That would work, but will be pretty slow.