diff options
author | Caroline Tice <ctice@apple.com> | 2011-06-03 16:38:17 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2011-06-03 16:38:17 +0000 |
commit | 23c36bf516c2e9981086a2ac0e3e55161ca7f355 (patch) | |
tree | 225e96a2492ddcc0793a99de93dd7d9dbbdc5158 /www/scripting.html | |
parent | e5ed8e90471d8f56d054909f06e91b06ce38ff05 (diff) | |
download | lldb-23c36bf516c2e9981086a2ac0e3e55161ca7f355.tar.gz |
Make a few minor changes/corrections to scripting
example on the web.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132554 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/scripting.html')
-rwxr-xr-x | www/scripting.html | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/www/scripting.html b/www/scripting.html index 042624943..fb7dc573a 100755 --- a/www/scripting.html +++ b/www/scripting.html @@ -210,15 +210,15 @@ you would do something like this:</p>
<code>
- % lldb<br>
- (lldb) process attach -n "dictionary"<br>
+ % <strong>lldb</strong><br>
+ (lldb) <strong>process attach -n "dictionary"</strong><br>
Architecture set to: x86_64.<br>
Process 521 stopped<br>
* thread #1: tid = 0x2c03, 0x00007fff86c8bea0 libSystem.B.dylib`read$NOCANCEL + 8, stop reason = signal SIGSTOP<br>
frame #0: 0x00007fff86c8bea0 libSystem.B.dylib`read$NOCANCEL + 8<br>
- (lldb) br s -n find_word<br>
+ (lldb) <strong>breakpoint set -n find_word</strong><br>
Breakpoint created: 1: name = 'find_word', locations = 1, resolved = 1<br>
- (lldb) c<br>
+ (lldb) <strong>continue</strong><br>
Process 521 resuming<br>
Process 521 stopped<br>
* thread #1: tid = 0x2c03, 0x0000000100001830 dictionary`find_word + 16 <br>
@@ -231,15 +231,15 @@ 106 return 0;<br>
107 <br>
108 int compare_value = strcmp (word, dictionary->word);<br>
- (lldb) script<br>
+ (lldb) <strong>script</strong><br>
Python Interactive Interpreter. To exit, type 'quit()', 'exit()' or Ctrl-D.<br>
- >>> import tree_utils<br>
- >>> root = lldb.frame.FindVariable ("dictionary")<br>
- >>> current_path = ""<br>
- >>> path = tree_utils.DFS (root, "Romeo", current_path)<br>
- >>> print path<br>
+ >>> <strong>import tree_utils</strong><br>
+ >>> <strong>root = lldb.frame.FindVariable ("dictionary")</strong><br>
+ >>> <strong>current_path = ""</strong><br>
+ >>> <strong>path = tree_utils.DFS (root, "Romeo", current_path)</strong><br>
+ >>> <strong>print path</strong><br>
LLRRL<br>
- >>> ^D<br>
+ >>> <strong>^D</strong><br>
(lldb) <br>
</code>
@@ -253,7 +253,7 @@ import tree_utils
</code>
- <p>imports the file where we our DFS function, tree_utils.py, into Python.
+ <p>imports the file where we wrote our DFS function, tree_utils.py, into Python.
Notice that to import the file we leave off the ".py" extension. We can now
call any function in that file, giving it the prefix "tree_utils.", so that
Python knows where to look for the function. The line</p>
|