From: Greg Clayton Date: Wed, 17 Oct 2012 20:58:52 +0000 (+0000) Subject: Added register write examples and also how to modify the pc. For this we show and... X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=84ffa16de66585537515ec77f7ce971e146a06f9;p=platform%2Fupstream%2Fllvm.git 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 --- diff --git a/lldb/www/lldb-gdb.html b/lldb/www/lldb-gdb.html index 9050296..214b6e1 100755 --- a/lldb/www/lldb-gdb.html +++ b/lldb/www/lldb-gdb.html @@ -694,6 +694,26 @@ + Write a new decimal value '123' to the current thread register 'rax'. + + + (gdb) p $rax = 123
+ + + (lldb) register write rax 123
+ + + + 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. + + + (gdb) jump *$pc+8
+ + + (lldb) register write pc `$pc+8`
+ + + Show the general purpose registers for the current thread formatted as signed decimal. LLDB tries to use the same format characters as printf(3) when possible. Type "help format" to see the full list of format specifiers.