[Lldb-commits] [PATCH] D75880: [NFC} Move ThreadPlans stacks into their own class, store it in Process by TID

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 12 12:31:56 PDT 2020


jingham marked an inline comment as done.
jingham added a comment.

Removed Update till the next patch, and fixed a bug in PushPlan that preparing the next patch uncovered.



================
Comment at: lldb/include/lldb/Target/ThreadPlanStack.h:126-130
+    auto result = m_plans_list.find(tid);
+    if (result == m_plans_list.end())
+      return false;
+    result->second.ThreadDestroyed(nullptr);
+    m_plans_list.erase(result);
----------------
labath wrote:
> Any chance of calling `ThreadDestroyed` from ThreadPlanStack destructor, so this can just be `m_plan_list.erase(tid)` ?
I dislike postponing things that might do needed work (like remove tell all the plans in the stack to remove their breakpoints) till a destructor happens to run.  That makes lldb's state harder to reason about.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75880/new/

https://reviews.llvm.org/D75880





More information about the lldb-commits mailing list