aboutsummaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2013-02-12 20:01:49 +0000
committerDaniel Malea <daniel.malea@intel.com>2013-02-12 20:01:49 +0000
commit7a87d52785eba653682d6f3c66bad1871d8c7108 (patch)
treeaadcd8940738b2efa70bb65301c877f89bede2d4 /www
parenta53efae12c58ccb0679a8a10aad2807cd306e27a (diff)
downloadlldb-7a87d52785eba653682d6f3c66bad1871d8c7108.tar.gz
Fix document typos, indentation in python code, and API examples.
Patch by Bruce Mitchener! git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www')
-rwxr-xr-xwww/python-reference.html53
1 files changed, 29 insertions, 24 deletions
diff --git a/www/python-reference.html b/www/python-reference.html
index cad447ba6..86edbc54c 100755
--- a/www/python-reference.html
+++ b/www/python-reference.html
@@ -517,6 +517,11 @@ $2 = 0x000000010010aba0 Let's Be Friendsfoobar</tt></pre></code>
<code><pre><tt><font color=green>#!/usr/bin/python</font>
import lldb
+import os
+
+def disassemble_instructions(insts):
+ for i in insts:
+ print i
<font color=green># Set the path to the executable to debug</font>
exe = "./a.out"
@@ -550,30 +555,30 @@ if target:
state = process.GetState ()
print process
if state == lldb.eStateStopped:
- <font color=green># Get the first thread</font>
- thread = process.GetThreadAtIndex (0)
- if thread:
- <font color=green># Print some simple thread info</font>
- print thread
- <font color=green># Get the first frame</font>
- frame = thread.GetFrameAtIndex (0)
- if frame:
- <font color=green># Print some simple frame info</font>
- print frame
- function = frame.GetFunction()
- <font color=green># See if we have debug info (a function)</font>
- if function:
- <font color=green># We do have a function, print some info for the function</font>
- print function
- <font color=green># Now get all instructions for this function and print them</font>
- insts = function.GetInstructions(target)
- disassemble_instructions (insts)
- else:
- <font color=green># See if we have a symbol in the symbol table for where we stopped</font>
- symbol = frame.GetSymbol();
- if symbol:
- <font color=green># We do have a symbol, print some info for the symbol</font>
- print symbol
+ <font color=green># Get the first thread</font>
+ thread = process.GetThreadAtIndex (0)
+ if thread:
+ <font color=green># Print some simple thread info</font>
+ print thread
+ <font color=green># Get the first frame</font>
+ frame = thread.GetFrameAtIndex (0)
+ if frame:
+ <font color=green># Print some simple frame info</font>
+ print frame
+ function = frame.GetFunction()
+ <font color=green># See if we have debug info (a function)</font>
+ if function:
+ <font color=green># We do have a function, print some info for the function</font>
+ print function
+ <font color=green># Now get all instructions for this function and print them</font>
+ insts = function.GetInstructions(target)
+ disassemble_instructions (insts)
+ else:
+ <font color=green># See if we have a symbol in the symbol table for where we stopped</font>
+ symbol = frame.GetSymbol();
+ if symbol:
+ <font color=green># We do have a symbol, print some info for the symbol</font>
+ print symbol
</tt></pre></code>
</div>
<div class="postfooter"></div>