124 points · by grogers · 17y ago · 40 comments
I guess the advantage of doing it that way is that the majority of the memory pages can be shared if the OS uses a copy-on-write virtual memory system.
This:
Breakpoints and watchpoints will work in reverse -- allowing you for instance to proceed directly to the previous point at which a variable was modified.
is going to absolutely killer functionality for reverse engineers.
http://www.lambdacs.com/debugger/
watch the author give a talk at Google: http://video.google.com/videoplay?docid=3897010229726822034
I wonder how much memory will it take to run a "usefully large" program with state recording on? In theory you could compress some memory mutations pretty easily (like bzero()ing something) while other mutations would need more memory (writing single ints to various locations). I bet you could generate some nifty 10GB logs with this thing!
The huge issue here is, the most probable reason for segfaulting was an unexpected value coming from the environment and it's impossible to know the environment the process was running in post-mortem.
It's rather like adding a "time" dimension to your core file. ;-)
Unfortunately I was too lazy to finish it, but I think it would have worked. It was just a proof of concept.
Hmm, maybe I should put that in all my programs - then I won't ever have bugs from segfaults.
:)
Second, the debugger generally catches the signal before it gets handled.