[Lldb-commits] [PATCH] D96688: [lldb] Minor refinements to ThreadPlan::RestoreThreadState (NFC)
Dave Lee via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 15 17:59:06 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG65d91b40ae1d: [lldb] Minor refinements to ThreadPlan::RestoreThreadState (NFC) (authored by kastiglione).
Changed prior to commit:
https://reviews.llvm.org/D96688?vs=323673&id=323855#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96688/new/
https://reviews.llvm.org/D96688
Files:
lldb/include/lldb/Target/Thread.h
lldb/include/lldb/Target/ThreadPlan.h
lldb/include/lldb/Target/ThreadPlanCallFunction.h
lldb/source/Target/Thread.cpp
lldb/source/Target/ThreadPlanCallFunction.cpp
Index: lldb/source/Target/ThreadPlanCallFunction.cpp
===================================================================
--- lldb/source/Target/ThreadPlanCallFunction.cpp
+++ lldb/source/Target/ThreadPlanCallFunction.cpp
@@ -454,8 +454,8 @@
m_subplan_sp->SetStopOthers(new_value);
}
-bool ThreadPlanCallFunction::RestoreThreadState() {
- return GetThread().RestoreThreadStateFromCheckpoint(m_stored_thread_state);
+void ThreadPlanCallFunction::RestoreThreadState() {
+ GetThread().RestoreThreadStateFromCheckpoint(m_stored_thread_state);
}
void ThreadPlanCallFunction::SetReturnValue() {
Index: lldb/source/Target/Thread.cpp
===================================================================
--- lldb/source/Target/Thread.cpp
+++ lldb/source/Target/Thread.cpp
@@ -530,7 +530,7 @@
return false;
}
-bool Thread::RestoreThreadStateFromCheckpoint(
+void Thread::RestoreThreadStateFromCheckpoint(
ThreadStateCheckpoint &saved_state) {
if (saved_state.stop_info_sp)
saved_state.stop_info_sp->MakeStopInfoValid();
@@ -539,7 +539,6 @@
saved_state.current_inlined_depth);
GetPlans().RestoreCompletedPlanCheckpoint(
saved_state.m_completed_plan_checkpoint);
- return true;
}
StateType Thread::GetState() const {
Index: lldb/include/lldb/Target/ThreadPlanCallFunction.h
===================================================================
--- lldb/include/lldb/Target/ThreadPlanCallFunction.h
+++ lldb/include/lldb/Target/ThreadPlanCallFunction.h
@@ -90,7 +90,7 @@
lldb::addr_t GetStopAddress() { return m_stop_address; }
- bool RestoreThreadState() override;
+ void RestoreThreadState() override;
void ThreadDestroyed() override { m_takedown_done = true; }
Index: lldb/include/lldb/Target/ThreadPlan.h
===================================================================
--- lldb/include/lldb/Target/ThreadPlan.h
+++ lldb/include/lldb/Target/ThreadPlan.h
@@ -464,10 +464,7 @@
// to restore the state when it is done. This will do that job. This is
// mostly useful for artificial plans like CallFunction plans.
- virtual bool RestoreThreadState() {
- // Nothing to do in general.
- return true;
- }
+ virtual void RestoreThreadState() {}
virtual bool IsVirtualStep() { return false; }
Index: lldb/include/lldb/Target/Thread.h
===================================================================
--- lldb/include/lldb/Target/Thread.h
+++ lldb/include/lldb/Target/Thread.h
@@ -1050,8 +1050,7 @@
virtual bool
RestoreRegisterStateFromCheckpoint(ThreadStateCheckpoint &saved_state);
- virtual bool
- RestoreThreadStateFromCheckpoint(ThreadStateCheckpoint &saved_state);
+ void RestoreThreadStateFromCheckpoint(ThreadStateCheckpoint &saved_state);
void EnableTracer(bool value, bool single_step);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96688.323855.patch
Type: text/x-patch
Size: 2791 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210216/fe95206c/attachment.bin>
More information about the lldb-commits
mailing list