[Lldb-commits] [lldb] r170014 - /lldb/trunk/www/python-reference.html

Jim Ingham jingham at apple.com
Wed Dec 12 12:23:52 PST 2012

Author: jingham
Date: Wed Dec 12 14:23:52 2012
New Revision: 170014

URL: http://llvm.org/viewvc/llvm-project?rev=170014&view=rev
Added a warning about using the lldb.target, etc. for anything other than convenience when using the
script command.


Modified: lldb/trunk/www/python-reference.html
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/python-reference.html?rev=170014&r1=170013&r2=170014&view=diff
--- lldb/trunk/www/python-reference.html (original)
+++ lldb/trunk/www/python-reference.html Wed Dec 12 14:23:52 2012
@@ -96,10 +96,14 @@
                     <p>This drops you into the embedded python interpreter. When running under the <b>script</b> command, 
                        lldb sets some convenience variables that give you quick access to the currently selected entities that characterize
                        the program and debugger state.  In each case, if there is no currently selected entity of the appropriate
-                       type, the variable's <b>IsValid</b> method will return false.  
+                       type, the variable's <b>IsValid</b> method will return false. 
                     <p>Note also, these variables hold the values
                        of the selected objects on entry to the embedded interpreter.  They do not update as you use the LLDB
-                       API's to change, for example, the currently selected stack frame or thread.</p>
+                       API's to change, for example, the currently selected stack frame or thread.  
+                     <p>As a corollary to this, because they get reset every time the script interpreter is entered, you should not
+                       use these variables in general purpose python code that you write using the lldb module.  After all, lldb can
+                       run in a multithreaded environment, and another thread might call the "script" command, changing the value out
+                       from under you.</p>
                        These are all global variables contained in the <b>lldb</b> python namespace :</p>
                     <table class="stats" width="620" cellspacing="0">

More information about the lldb-commits mailing list