1.3 KiB
1.3 KiB
Reverse Execution Demo
This is a demo showcasing Renode's support for GDB reverse execution.
Running the demo
gdb_reverse_execution.rescRenode script creates a RISC-V machine with small assembly printing to UART.
renode scripts/complex/reverse_execution/gdb_reverse_execution.resc
- Use
script.gdbGDB script to easily connect to Renode with preset breakpoints.
gdb -x script.gdb
- Follow the flow of the demonstration
Breakpoint 1, 0x80000000 in ?? ()
(gdb) continue
Continuing.
Breakpoint 2, 0x80000014 in ?? ()
(gdb) continue
Continuing.
Breakpoint 3, 0x8000003a in ?? ()
Now you can see :( printed on UART.
- Execute
reverse-*commands in GDB:
(gdb) reverse-continue
Continuing.
Breakpoint 2, 0x80000014 in ?? ()
(gdb) reverse-stepi
0x80000010 in ?? ()
(gdb) rsi
0x8000000e in ?? ()
(gdb) rc
Continuing.
Breakpoint 1, 0x80000000 in ?? ()
(gdb)
- Set
t4register to0x1337to branch inbeq t3, t4, oktest.
(gdb) set $t4=0x1337
(gdb) continue
Continuing.
Breakpoint 2, 0x80000014 in ?? ()
(gdb) continue
Continuing.
Breakpoint 3, 0x8000003a in ?? ()
(gdb)
Spot OK on UART console!
For more information visit Renode documentation