23.9.5.1. QEMU reverse debugging
QEMU replays support checkpointing, and this allows for a simplistic "reverse debugging" implementation since v5.2.0:
./run --eval-after './linux/rand_check.out;./linux/poweroff.out;' --record ./run --eval-after './linux/rand_check.out;./linux/poweroff.out;' --replay --gdb-wait
On another shell:
./run-gdb start_kernel
In GDB:
n n n n reverse-continue
and we are back at start_kernel
reverse-continue
proceeds to the latest of the earlier breakpoints or to the very beginning if there were no breakpoints before.