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
diff --git a/www/python-reference.html b/www/python-reference.html
index cad447b..86edbc5 100755
--- a/www/python-reference.html
+++ b/www/python-reference.html
@@ -517,6 +517,11 @@
 <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 @@
         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>