Saving a process' context
Lucas Correia Villa Real
lucasvr@gobolinux.org
Thu May 6 03:24:00 GMT 2004
(please CC: on reply)
Hi,
Sorry if this is not the right place to ask this question, but feel free to
point me to another mailing list if it's appropriate.
I'm playing with getcontext() and setcontext() in order to try to save a
process' context into the disk and restore it at a later time. It's working
fine, but when I restore the image from the disk it only keeps executing the
latest function, and when tries to return for the caller's function, it
reaches an invalid pointer and aborts.
As far as I could understand, getcontext() is only saving the latest frame
from the stack, and hence the restoration isn't able to restore the entire
process image.. or am I wrong?
Is it correct to use getcontext() and setcontext() to save the entire image,
or should I look for some other tools in order to do that?
Any help will be very appreciated. Please CC: me on reply, as I'm not
subscribed to this list.
Many thanks in advance,
Lucas
More information about the Gcc
mailing list