[Lldb-commits] [lldb] [lldb/docs] Add scripting extensions documentation to the website (PR #97262)

via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 1 15:50:51 PDT 2024


================
@@ -0,0 +1,70 @@
+from abc import abstractmethod
+
+import lldb
+
+
+class ScriptedThreadPlan:
+    """
+    Class that provides data for an instance of a LLDB 'ScriptedThreadPlan' plug-in class used to construct custom stepping logic.
+
+    """
+
+    def __init__(self, thread_plan: lldb.SBThreadPlan):
+        """Initialization needs a valid lldb.SBThreadPlan object. This plug-in will get created after a live process is valid and has stopped.
+
+        Args:
+            thread_plan (lldb.SBThreadPlan): The underlying `ThreadPlan` that is pushed onto the plan stack.
+        """
+        self.thread_plan = thread_plan
+
+    def explains_stop(self, event: lldb.SBEvent) -> bool:
+        """Each plan is asked if it "explains" the stop.  The first plan to claim the stop wins.
----------------
jimingham wrote:

Might be good to specify the ordering here:

Each plan is asked - from youngest to oldest - if it "explains" the stop.

https://github.com/llvm/llvm-project/pull/97262


More information about the lldb-commits mailing list