rocallahan wrote:

> (The precommit test failures look real though)

Indeed. The problem was in `ThreadList::WillResume()`, which is a tricky 
function that my changes made even trickier. The basic problem is that we make 
execution direction depend on the state of the thread plans and which thread 
we're going to run, but `SetupToStepOverBreakpointIfNeeded()` depends on the 
direction and and can change the thread plan and which thread we're going to 
run --- so conceptually we have cyclic dependencies. It all works out in the 
end because `SetupToStepOverBreakpointIfNeeded()` only does something if 
`direction` is forward, and it can't change the direction to backward, but we 
have to be very careful.

To make this more correct and easier to review, I've rewritten my changes to 
`ThreadList::WillResume()` and factored them out into multiple commits in this 
PR. First there's a series of commits that refactor `WillResume()` on the main 
branch, step by step, getting it into a state where the changes for reverse 
execution are simple. Hopefully it's clear how each of those refactoring 
commits preserves the current behavior. Then there's the reverse-execution 
commit itself. Then there's one more commit that does a little bit more cleanup 
of `WillResume()`.

Up to you/Jim whether you want me to squash all these together after review, or 
rebase and merge all of them. Let me know. If it's the latter, then I should 
probably clean up the commit messages.

https://github.com/llvm/llvm-project/pull/112079
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to