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 []
 


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to