[lldb] Fix new thread detection mechanism #10064
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In ThreadList::WillResume, we scan the list of threads to check whether a solo run was requested. If so, we ensure that new threads can't be created and run.
However, we need to make these checks after
SetupForResume
is called, as that may push plans. For example, a thread that has only a Base Plan, but has hit a breakpoint, will enqueue a "Step Over Breakpoint" plan, which must be run in isolation.Unfortunately, it seems impossible to write a test for this.
Note: this was "fixed" by this "NFC" commit upstream: llvm#120817
I don't want to cherry pick such a major patch here; instead, I'm proposing this more targeted fix that we don't need to put into
next
.