[Lldb-commits] [PATCH] D96715: [lldb] Decouple IsMasterPlan and OkayToDiscard (NFC)
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 15 08:06:28 PST 2021
kastiglione created this revision.
kastiglione added a reviewer: jingham.
kastiglione requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
While learning the semantics of `IsMasterPlan` and `OkayToDiscard`, and guided by the
FIXME comment in ThreadPlan.h, this change decouples the two functions.
These two functions have been called in pairs, for example:
SetIsMasterPlan(true);
SetOkayToDiscard(false);
With this change, almost all cases turn into a single `SetIsMasterPlan(true)` call. Note
that `m_okay_to_discard` now defaults to false.
Most of the decoupling happens in `ThreadPlanStack::DiscardConsultingMasterPlans`, which
handles `OkayToDiscard` and `IsMasterPlan` individually. This function could be renamed,
but I haven't thought of a good alternative.
Other notes:
- `OkayToDiscard` is no longer virtual
- `ThreadPlanPython` was incorrectly calling `SetOkayToDiscard(true)`
- Reworded some comments
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D96715
Files:
lldb/include/lldb/Target/ThreadPlan.h
lldb/include/lldb/Target/ThreadPlanBase.h
lldb/source/API/SBThread.cpp
lldb/source/Commands/CommandObjectThread.cpp
lldb/source/Expression/FunctionCaller.cpp
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp
lldb/source/Target/Process.cpp
lldb/source/Target/StopInfo.cpp
lldb/source/Target/Thread.cpp
lldb/source/Target/ThreadPlan.cpp
lldb/source/Target/ThreadPlanCallFunction.cpp
lldb/source/Target/ThreadPlanCallUserExpression.cpp
lldb/source/Target/ThreadPlanPython.cpp
lldb/source/Target/ThreadPlanStack.cpp
lldb/source/Target/ThreadPlanStepOut.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96715.323761.patch
Type: text/x-patch
Size: 13612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210215/e00d54c4/attachment.bin>
More information about the lldb-commits
mailing list