I'm reading gdb manual for the first time after using it blind for ages.
-
I'm reading gdb manual for the first time after using it blind for ages.
I could've always had access to reverse execution and bookmarks? What?
Why didn't I read this before, I want my hours debugging and restarting weird programs back. -
@snowycoder wait, does reverse execution mean what i think it means?
undo a line of code being executed... somehow?
-
@steffo yess!
You just do a reverse next and you can inspect the state of the system before that instruction was executed. It's the holy grail of debugging.Some emulators might have these commands built-in, but for x86-64 it seems to magically records the changes to the registers and the memory, and when you undo an instruction it enters replay mode.
It should be just like "ohh, my program is trying to fetch code ad 0x0000, press undo, ah here was the jump"