summaryrefslogtreecommitdiffstats
path: root/lldb/www/python-reference.html
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-06-29 16:25:05 +0000
committerGreg Clayton <gclayton@apple.com>2012-06-29 16:25:05 +0000
commit3e3b48e669e29b467086f59558db42b191ee5f19 (patch)
treef086288f81748ce1d5b0aeb4a736cd0bb5dd05fd /lldb/www/python-reference.html
parent6e7e6b646b8b2a4337afce5a3255ff56cf1ef240 (diff)
downloadbcm5719-llvm-3e3b48e669e29b467086f59558db42b191ee5f19.tar.gz
bcm5719-llvm-3e3b48e669e29b467086f59558db42b191ee5f19.zip
Added information on how to get API documentation in a "Documentation" section.
llvm-svn: 159434
Diffstat (limited to 'lldb/www/python-reference.html')
-rwxr-xr-xlldb/www/python-reference.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/lldb/www/python-reference.html b/lldb/www/python-reference.html
index 6381f0d8c8e..c3d32fc23a0 100755
--- a/lldb/www/python-reference.html
+++ b/lldb/www/python-reference.html
@@ -29,6 +29,54 @@
</div>
<div class="postfooter"></div>
+ <div class="post">
+ <h1 class ="postheader">Documentation</h1>
+ <div class="postcontent">
+
+ <p>The LLDB API is contained in a python module named <b>lldb</b>. Help is available through the standard python help and documentation. To get an overview of the <b>lldb</b> python module you can execute the following command:</p>
+<code><pre><tt>(lldb) <b>script help(lldb)</b>
+ Help on package lldb:
+
+ NAME
+ lldb - The lldb module contains the public APIs for Python binding.
+
+ FILE
+ /System/Library/PrivateFrameworks/LLDB.framework/Versions/A/Resources/Python/lldb/__init__.py
+
+ DESCRIPTION
+...
+</tt></pre></code>
+ <p>You can also get help using a module class name. The full API that is exposed for that class will be displayed in a man page style window. Below we want to get help on the lldb.SBFrame class:</p>
+<code><pre><tt>(lldb) <b>script help(lldb.SBFrame)</b>
+ Help on class SBFrame in module lldb:
+
+ class SBFrame(__builtin__.object)
+ | Represents one of the stack frames associated with a thread.
+ | SBThread contains SBFrame(s). For example (from test/lldbutil.py),
+ |
+ | def print_stacktrace(thread, string_buffer = False):
+ | '''Prints a simple stack trace of this thread.'''
+ |
+...
+</tt></pre></code>
+ <p>Or you can get help using any python object, here we use the <b>lldb.process</b> object which is a global variable in the <b>lldb</b> module which represents the currently selected process:</p>
+<code><pre><tt>(lldb) <b>script help(lldb.process)</b>
+ Help on SBProcess in module lldb object:
+
+ class SBProcess(__builtin__.object)
+ | Represents the process associated with the target program.
+ |
+ | SBProcess supports thread iteration. For example (from test/lldbutil.py),
+ |
+ | # ==================================================
+ | # Utility functions related to Threads and Processes
+ | # ==================================================
+ |
+...
+</tt></pre></code>
+
+ </div>
+ <div class="postfooter"></div>
<div class="post">
<h1 class ="postheader">Embedded Python Interpreter</h1>
OpenPOWER on IntegriCloud