[Lldb-commits] [PATCH] D97076: [lldb] Refine ThreadPlan::ShouldAutoContinue

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 19 12:18:09 PST 2021


kastiglione added inline comments.


================
Comment at: lldb/include/lldb/Target/ThreadPlan.h:354-359
+  /// Returns whether this thread plan overrides the `ShouldStop` of previous
+  /// plans.
+  ///
+  /// When processing the thread plan stack, this function gives plans the
+  /// ability to continue - even when previous plans subsequently return false
+  /// from `ShouldStop`. \see Thread::ShouldStop
----------------
Happy to iterate on this. I wanted to take the opportunity to explain this, since by name it may seem unclear how exactly it relates to `ShouldStop`.


================
Comment at: lldb/source/Target/Thread.cpp:832
         if (plan_ptr->PlanExplainsStop(event_ptr)) {
+          LLDB_LOGF(log, "Plan %s explains stop.", plan_ptr->GetName());
+
----------------
This log was previously incorrect about which plan explains the stop. I moved it here and fixed it.


================
Comment at: lldb/source/Target/Thread.cpp:884
 
+          PopPlan();
+
----------------
This is a drive by change. It was called from both branches of an `if`/`else`, so I lifted it out to be clear that it happens either way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97076



More information about the lldb-commits mailing list