summaryrefslogtreecommitdiffstats
path: root/lldb/www/python-reference.html
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2012-12-12 20:23:52 +0000
committerJim Ingham <jingham@apple.com>2012-12-12 20:23:52 +0000
commitbd15897f3567fa93e716ffa8afcdc9db4e397885 (patch)
treeee26ddde9e3a09e0f29477638d75aca8ccfdd43b /lldb/www/python-reference.html
parenteb17816bf43d77ab61051d4e582dc4ce2ed2e843 (diff)
downloadbcm5719-llvm-bd15897f3567fa93e716ffa8afcdc9db4e397885.tar.gz
bcm5719-llvm-bd15897f3567fa93e716ffa8afcdc9db4e397885.zip
Added a warning about using the lldb.target, etc. for anything other than convenience when using the
script command. llvm-svn: 170014
Diffstat (limited to 'lldb/www/python-reference.html')
-rwxr-xr-xlldb/www/python-reference.html8
1 files changed, 6 insertions, 2 deletions
diff --git a/lldb/www/python-reference.html b/lldb/www/python-reference.html
index 007ac7eb565..dface4871f3 100755
--- a/lldb/www/python-reference.html
+++ b/lldb/www/python-reference.html
@@ -96,10 +96,14 @@ Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.
<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">
<tr>
OpenPOWER on IntegriCloud