This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Saving a process' context
- From: Lucas Correia Villa Real <lucasvr at gobolinux dot org>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 6 May 2004 00:25:00 -0300
- Subject: Saving a process' context
(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