forked from OSchip/llvm-project
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.
llvm-svn: 166127
This commit is contained in:
parent
7a442c8031
commit
84ffa16de6
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue