[Lldb-commits] [lldb] Reapply "[lldb] Implement basic support for reverse-continue (#125242)" (again) (PR #128156)

Robert O'Callahan via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 17 14:04:50 PDT 2025


rocallahan wrote:

My reverse-execution proxy code implements watchpoints during reverse execution more or less by reversing the x86 behavior: if we execute a sequence of instructions and instruction #N in the sequence modifies a watched memory location, then when reverse-executing, we stop when the PC is at the address of instruction N, i.e. with instruction N being the next instruction to be executed, and report that that watchpoint fired. (On x86 executing in the forward direction, normal debugger behavior is that execution stops with the PC set to the address of instruction N+1, i.e. after instruction N has been executed, because this is what the hardware does). This all works the same whether you're using continue or a sequence of single-steps (in either direction).

As I understand it, when ARM hardware hits a watchpoint, it stops with the PC at the address of instruction #N that did the memory access, i.e. the next instruction to be executed is #N again. So that's different from x86 and maybe that's the root of our problems here. I will start an ARM64 VM and do some experiments ... maybe tomorrow.

https://github.com/llvm/llvm-project/pull/128156


More information about the lldb-commits mailing list