[Lldb-commits] [lldb] [lldb] Implement basic support for reverse-continue (PR #112079)
Robert O'Callahan via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 17 18:11:13 PST 2024
================
@@ -608,19 +594,47 @@ bool ThreadList::WillResume() {
}
bool need_to_resume = true;
-
if (run_me_only_list.GetSize(false) == 0) {
+ *direction = m_process.GetBaseDirection();
+ // We've determined the direction so now we can determine which
+ // threads need to step over breakpoints.
+ for (pos = m_threads.begin(); pos != end; ++pos) {
+ if ((*pos)->GetResumeState() != eStateSuspended &&
+ (!wants_solo_run || (*pos)->GetCurrentPlan()->StopOthers())) {
+ if ((*pos)->IsOperatingSystemPluginThread() &&
+ !(*pos)->GetBackingThread())
+ continue;
+ if ((*pos)->SetupToStepOverBreakpointIfNeeded(*direction)) {
+ run_me_only_list.AddThread(*pos);
+ break;
+ }
+ }
+ }
+ } // else we'll set *direction to the direction of the chosen thread later
+ if (run_me_only_list.GetSize(false) == 0) {
+ // *direction has been set to m_process.GetBaseDirection().
// Everybody runs as they wish:
for (pos = m_threads.begin(); pos != end; ++pos) {
ThreadSP thread_sp(*pos);
StateType run_state;
- if (thread_sp->GetResumeState() != eStateSuspended)
+ if (thread_sp->GetResumeState() != eStateSuspended) {
----------------
rocallahan wrote:
Done.
https://github.com/llvm/llvm-project/pull/112079
More information about the lldb-commits
mailing list