rizin icon indicating copy to clipboard operation
rizin copied to clipboard

Time-travelling based debugger

Open umbrageodotus opened this issue 2 months ago • 6 comments

Is your feature request related to a problem? Please describe. I love rr's time-travel-based debugger idea but I like cutter and the rizin/r2 philosophy framework a ton.

Describe the solution you'd like I'd like a rr-style time-travel debugger, implemented to fit rizin.

umbrageodotus avatar Oct 09 '25 16:10 umbrageodotus

rr apparently supports IDEs with it's gdb interface (https://github.com/rr-debugger/rr/wiki/Using-rr-in-an-IDE).

So either it is already possible to use it or it shouldn't be too difficult to add. But I am not familiar with RzDebug.

cc @well-mannered-goat @wargio

Rot127 avatar Oct 10 '25 13:10 Rot127

this requires rzil. this can be easily implemented as rzil events and stored in frames.

I think there is an issue about this somewhere? @notxvilka

wargio avatar Oct 10 '25 14:10 wargio

this requires rzil. this can be easily implemented as rzil events and stored in frames.

I think there is an issue about this somewhere? @notxvilka

Yes:

  • https://github.com/rizinorg/rizin/issues/4736
  • https://github.com/rizinorg/rizin/issues/3676

notxvilka avatar Oct 10 '25 15:10 notxvilka

Though our RzIL VM can't step backwards IIRC.

Rot127 avatar Oct 10 '25 15:10 Rot127

If we speak about the backward step and recording, Rizin already supports it - see dsb and dts commands. It is experimental and could be better tested and improved.

See the corresponding chapter of the book: https://book.rizin.re/src/debugger/revdebug.html

cc @well-mannered-goat

notxvilka avatar Oct 10 '25 15:10 notxvilka

If we speak about the backward step and recording, Rizin already supports it - see dsb and dts commands. It is experimental and could be better tested and improved.

Yes, backward stepping is present in the debugger for some archos combinations IIRC The session is maintained through RzDebugSession, but I havent really worked with it till now. For each function (lets stay stepping) we have a different implementation when in a session and different for normal one

Maybe refactor RzDebugSession such that it by default works for normal one, but when a session is started for recording, it initalizes some if its values and then works for backward stepping etc? and add better testing

well-mannered-goat avatar Oct 11 '25 14:10 well-mannered-goat