From bd15897f3567fa93e716ffa8afcdc9db4e397885 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Wed, 12 Dec 2012 20:23:52 +0000 Subject: Added a warning about using the lldb.target, etc. for anything other than convenience when using the script command. llvm-svn: 170014 --- lldb/www/python-reference.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lldb/www/python-reference.html') 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.

This drops you into the embedded python interpreter. When running under the script 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 IsValid method will return false. + type, the variable's IsValid method will return false.

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.

+ API's to change, for example, the currently selected stack frame or thread. +

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.

These are all global variables contained in the lldb python namespace :

-- cgit v1.2.3