[Lldb-commits] [lldb] edea4a3 - You can't use lldb.target in a frame recognizer.

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 6 13:20:59 PDT 2022


Author: Jim Ingham
Date: 2022-09-06T13:20:48-07:00
New Revision: edea4a349d04972783d74d00af9245768d6b586e

URL: https://github.com/llvm/llvm-project/commit/edea4a349d04972783d74d00af9245768d6b586e
DIFF: https://github.com/llvm/llvm-project/commit/edea4a349d04972783d74d00af9245768d6b586e.diff

LOG: You can't use lldb.target in a frame recognizer.

Added: 
    

Modified: 
    lldb/docs/use/python-reference.rst

Removed: 
    


################################################################################
diff  --git a/lldb/docs/use/python-reference.rst b/lldb/docs/use/python-reference.rst
index ee3db9ab56d10..9431704902091 100644
--- a/lldb/docs/use/python-reference.rst
+++ b/lldb/docs/use/python-reference.rst
@@ -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 []
 


        


More information about the lldb-commits mailing list