================
@@ -86,8 +88,30 @@ lldb::StateType
ScriptedThreadPlanPythonInterface::GetRunState() {
error))
return lldb::eStateStepping;
- return static_cast<lldb::StateType>(obj->GetUnsignedIntegerValue(
- static_cast<uint32_t>(lldb::eStateStepping)));
+ // `should_step` answers a question, it does not return a StateType: the
----------------
jimingham wrote:
You don't need to explain why this is right and the buggy version (which will
vanish into git history) was wrong. That's going to just be confusing to
future auditors of the code.
The point that is useful is that internally, the thread plans can be marked not
just as "stepping" or "running" but "suspended". That's why the ThreadPlan
function returns a StateType. But setting a thread suspended is work that the
thread plan negotiations do, and not the thread plans themselves. Since the
scripted plan can only say "stepping or running", we chose a bool as a more
fitting interface.
https://github.com/llvm/llvm-project/pull/215521
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits