[Lldb-commits] [PATCH] D85265: Add a setting to always run all threads when stepping
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 7 13:48:35 PDT 2020
jingham added inline comments.
Comment at: lldb/source/Commands/CommandObjectThread.cpp:486-490
+ // NonStopMode runs all threads down in the ProcessPlugin layer, but
+ // at this level we need to pretend we are actually only running this
+ // thread. So functionally it does the same thing as
+ // GetSteppingRunsAllThreads. So it overrides the runs all threads
+ // setting.
> jingham wrote:
> > friss wrote:
> > > It feels like the last sentence shouldn't be there.
> > >
> > > Also, the comment doesn't explain *why* "we need to pretend".
> > Is this better?
> Yes, although it still doesn't explain why this implementation detail matters. The comment makes it sound it shouldn't matter. It would be great to document what would break if we didn't set it.
I don't know why the non-stop mode does things the way it does. That and the fact that it is most likely not very reliable makes me not what to try to put down how it does work here.
All that's relevant to this patch is that if non-stop mode is on, you are running all threads always, so whether you want to run them only when stepping is not relevant, and that's why in this case we aren't checking the setting.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the lldb-commits