You can't use lldb.target in a frame recognizer.
authorJim Ingham <jingham@apple.com>
Tue, 6 Sep 2022 20:20:03 +0000 (13:20 -0700)
committerJim Ingham <jingham@apple.com>
Tue, 6 Sep 2022 20:20:48 +0000 (13:20 -0700)
lldb/docs/use/python-reference.rst

index ee3db9a..9431704 100644 (file)
@@ -860,7 +860,8 @@ functions 'read', 'write' and 'close' follows:
     def get_recognized_arguments(self, frame):
       if frame.name in ["read", "write", "close"]:
         fd = frame.EvaluateExpression("$arg1").unsigned
-        value = lldb.target.CreateValueFromExpression("fd", "(int)%d" % fd)
+        target = frame.thread.process.target
+        value = target.CreateValueFromExpression("fd", "(int)%d" % fd)
         return [value]
       return []