Reading and writing the Stack

Anthony Mutiso anthony at alberta.UUCP
Tue Nov 8 12:01:10 AEST 1988


Hi, there Netfolks:

Any one have any ideas how one can do the following in C:-

	(1) find the bottom and the top of a processes stack.
	(2) read the information on stack.
	(3) copy the stack to disk ala core dump, as a way of saving the
	    process context.
	(4) write to the stack (i.e grow the stack and place return addresses and
	    automatic variables (initialized), etc, on it.

I would like to prime a processes stack, so a process can begin from somewhere
in the middle of its address space (in some special function, rather than the
in the main) and unwind the stack in the usual way when the special function returns)

---------------------
Anthony Mutiso
			anthony at alberta.UUCP



More information about the Comp.lang.c mailing list