Skip to content

QEMU Time Travel Debugging#105

Open
arbormoss wants to merge 6 commits intoUMN-Kernel-Object:trunkfrom
arbormoss:arbormoss/timetravel
Open

QEMU Time Travel Debugging#105
arbormoss wants to merge 6 commits intoUMN-Kernel-Object:trunkfrom
arbormoss:arbormoss/timetravel

Conversation

@arbormoss
Copy link
Copy Markdown
Contributor

@arbormoss arbormoss commented Apr 10, 2026

This adds time travel debugging using qemu's built in replay/record.
Only qemu-riscv64 is added. It is the highest priority target and meant
as the default virtual environment.

make qemu-record: Record a debug playback.
make qemu-replay: Replay a debug playback for gdb. Run make gdb in
another terminal.

rsi or reverse-stepi steps one instruction backwards and rc or
reverse-continue finds the most recent breakpoint in the past.

This adds a time travel debugging tutorial to the docs. It says only
qemu-riscv64 is supported, because the other targets aren't added at
this point.

This should close #42 .

Merge this after #103 .

@arbormoss arbormoss force-pushed the arbormoss/timetravel branch from 1660d25 to 50bc9d9 Compare April 10, 2026 03:26
@arbormoss arbormoss closed this Apr 10, 2026
@arbormoss arbormoss reopened this Apr 10, 2026
This was referenced Apr 10, 2026
This gitignores cscope database files and vim swap files. Since two
members of UKO use cscope it is worth gitignoring, same with vim swap
files. The cscope database can be regenerated from the repository, and
swap files are temporary and should not be version controlled.

It may be worth adding a cscope make target like the linux kernel has.

Signed-off-by: arbormoss <arbormoss@woodsprite.dev>
This adds a make help target. If all supplied make targets are `help`,
configuration is not required. This also makes running `make help` by
itself faster, because it won't try to include the other Makefiles.

HELP_TEXT is defined at the top of the Makefile so that it can act
like documentation within the Makefile.

It suggests using `../configure` instead of
`../configure --targets qemu-riscv64` because the configure script will
explain how to list and select targets when run with no arguments.

Signed-off-by: arbormoss <arbormoss@woodsprite.dev>
This fixes the find prints after each file is formatted. The busybox
version of find in our alpine qemu VM does not recongnise -printf.

Signed-off-by: arbormoss <arbormoss@woodsprite.dev>
This adds time travel debugging using qemu's built in replay/record.
Only qemu-riscv64 is added. It is the highest priority target and meant
as the default virtual environment.

`make qemu-record`: Record a debug playback.
`make qemu-replay`: Replay a debug playback for gdb. Run `make gdb` in
another terminal.

`rsi` or `reverse-stepi` steps one instruction backwards and `rc` or
`reverse-continue` finds the most recent breakpoint in the past.

Signed-off-by: arbormoss <arbormoss@woodsprite.dev>
This adds a time travel debugging tutorial to the docs. It says only
`qemu-riscv64` is supported, because the other targets aren't added at
this point.

Signed-off-by: arbormoss <arbormoss@woodsprite.dev>
This adds the time travel targets for qemu record and recall to the help
text used in `make help`.

Signed-off-by: arbormoss <arbormoss@woodsprite.dev>
@arbormoss arbormoss force-pushed the arbormoss/timetravel branch from 50bc9d9 to 743b597 Compare April 10, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Time Travel Debugging

1 participant