4 ms·
> Having access to the memory dump of the live process "streamed" to the debugger would be great! This is also possible with standard debuggers, such as GDB: I
by ktpsns 7y ago
> Having access to the memory dump of the live process "streamed" to the debugger would be great!
This is also possible with standard debuggers, such as GDB: It can attach to a running process and not only examine the memory, but also debug (stop, pause, skip, ...) the stack trace and control flow. Usage is as simple as gdb -p $(pidof my_running_program)
- aloknnikhil 7y agoRight. But the difference is modifying any memory under GDB will be seen by the process. It's not copy-on-write
- coldtea 7y agoIsn't that a feature for debugging tho?
- aloknnikhil 7y agoAbsolutely. I was arguing for "unforking" to say a patched version of the process and verifying a fix without actually modifying the live process.
- andrewaylett 7y agoYou might also find https://rr-project.org/ https://rr-project.org/ interesting -- it lets you step backwards too.
- fooker 7y agogdb supports reverse debugging too
- Enginerrrd 7y agoInteresting. Without letting storage explode, I can't think of an easy way to do this since computation isn't really reversible.
- saagarjha 7y agoYou can keep track of the before and after states whenever you do something nonreversible, like a syscall.
- Doxin 7y agoAnd even then you can probably just store the diff instead of a full image. And even then if you run out of memory you can just start evicting the oldest snapshots.
- Enginerrrd 7y agoThere's a lot of nonreversability in the way a processor interacts with memory though.