[Lldb-commits] [lldb] r166127 - /lldb/trunk/www/lldb-gdb.html
Greg Clayton
gclayton at apple.com
Wed Oct 17 13:58:52 PDT 2012
Author: gclayton
Date: Wed Oct 17 15:58:52 2012
New Revision: 166127
URL: http://llvm.org/viewvc/llvm-project?rev=166127&view=rev
Log:
Added register write examples and also how to modify the pc. For this we show and example of GDB using the "jump" command, and LLDB using "register write" with an expression.
Modified:
lldb/trunk/www/lldb-gdb.html
Modified: lldb/trunk/www/lldb-gdb.html
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/lldb-gdb.html?rev=166127&r1=166126&r2=166127&view=diff
==============================================================================
--- lldb/trunk/www/lldb-gdb.html (original)
+++ lldb/trunk/www/lldb-gdb.html Wed Oct 17 15:58:52 2012
@@ -694,6 +694,26 @@
</td>
</tr>
+ <tr><td class="header" colspan="2">Write a new decimal value '123' to the current thread register 'rax'.</td></tr>
+ <tr>
+ <td class="content">
+ <b>(gdb)</b> p $rax = 123<br>
+ </td>
+ <td class="content">
+ <b>(lldb)</b> register write rax 123<br>
+ </td>
+ </tr>
+
+ <tr><td class="header" colspan="2">Skip 8 bytes ahead of the current program counter (instruction pointer). Note that we use backticks to evaluate an expression and insert the scalar result in LLDB.</td></tr>
+ <tr>
+ <td class="content">
+ <b>(gdb)</b> jump *$pc+8<br>
+ </td>
+ <td class="content">
+ <b>(lldb)</b> register write pc `$pc+8`<br>
+ </td>
+ </tr>
+
<tr><td class="header" colspan="2">Show the general purpose registers for the current thread formatted as <b>signed decimal</b>. LLDB tries to use
the same format characters as <b>printf(3)</b> when possible. Type "help format" to see the full list of format specifiers.</td></tr>
<tr>
More information about the lldb-commits
mailing list