[Lldb-commits] [PATCH] D159315: [lldb] Add OperatingSystem base class to the lldb python module

Will Hawkins via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 31 19:56:06 PDT 2023


hawkinsw added a comment.

I hope that some comments are helpful! The documentation that you added is tremendously helpful -- I know how documentation is sometimes a thankless task, so I will say what everyone is thinking: "THANK YOU".



================
Comment at: lldb/examples/python/templates/operating_system.py:11
+    """
+    Class that provides data for an instance of a LLDB 'OperatingSystemPython' plug-in class
+
----------------



================
Comment at: lldb/examples/python/templates/operating_system.py:27
+    - queue : thread dispatch queue name (optional key/value pair)
+    - state : thred state (mandatory, set to 'stopped' for now)
+    - core : the index of the core (lldb) thread that this OS Thread should shadow
----------------



================
Comment at: lldb/examples/python/templates/operating_system.py:31
+        Possible values include:
+        'breakpoint' if the thread is stopped at a breakpoint
+        'none' thread is just stopped because the process is stopped
----------------



================
Comment at: lldb/examples/python/templates/operating_system.py:32
+        'breakpoint' if the thread is stopped at a breakpoint
+        'none' thread is just stopped because the process is stopped
+        'trace' the thread just single stepped
----------------



================
Comment at: lldb/examples/python/templates/operating_system.py:33
+        'none' thread is just stopped because the process is stopped
+        'trace' the thread just single stepped
+        The usual value for this while threads are in memory is 'none'
----------------



================
Comment at: lldb/examples/python/templates/operating_system.py:73
+    def get_thread_info(self):
+        """Get the list of operating system threads. This method get called
+        automatically every time the process stops and it needs to update its
----------------



================
Comment at: lldb/examples/python/templates/operating_system.py:80
+                containing at least for each entry, the thread id, it's name,
+                queue, state, stop reason. It can also contain a `register_data_addr`
+                The list can be empty.
----------------
I am sorry but I do not quite understand the meaning of this description. It is probably because I am dense, but maybe you can look at rewording it slightly?


================
Comment at: lldb/examples/python/templates/operating_system.py:89
+        id. This method is called when unwinding the stack of one of the
+        operating system thread.
+
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159315



More information about the lldb-commits mailing list