Log in

View Full Version : Saving program state


Vigual
October 6th, 2010, 22:25
How can i save the state of a running program, including its memory, cpu flags, etc. I want to close a program, then open it and restore it to where I left off.

Kayaker
October 7th, 2010, 00:51
Hmm, a lot of problems associated with that methinks. What about locks, events, wait states, window handles, opened files? I don't think any of those would be valid on a restart and restoration of an arbitrary previous memory/context state.

I'd say just use a VM, but I assume that's not what you want.

_genuine
October 7th, 2010, 03:20
Hmm, theoretically what you want to do is not possible because of the things mentioned above, the closest you can get to it is if you were the author of the program. Using a dumping engine of some sort to save some important program state. ( I think of it like a game save feature ). If you're not the author, the best i can offer is a memory dump using some kind of debugger with the capabilities..You could maybe even write an extension that can come close to what you want to do, but of course what was mentioned will still be an obstacle.