hutch@sdcsvax.UUCP (Jim Hutchison) (07/30/85)
<>
4.2BSD, Vax 11/780 and Sun(4.2 rel1.2)
I am currently writing a pair of routines to dump and restore
the data and bss of a program. The reason? To checkpoint this
rather long running fractal program (higher resolutions will take
upwards of a fortnight to run on a sun, and with suntools...reboot!).
At the onset I tried to copy from etext to sbrk(0). This was fine
for reading it out, but writing it back in seems not to work.
I realize that something readonly is in there <or some such :-(>,
anybody know exactly what? If I could just find out, then its
just an X + sizeof(imposing twit).
Anyone know what it/they is/are, and how big? Looks like 48 bytes,
but the would just be a hack. I am trying to avoid the gnu emacs
method.
--
/*
Jim Hutchison UUCP: {dcdwest,ucbvax}!sdcsvax!hutch
ARPA: hutch@sdcsvax
[ Of course, these statements were typed into my terminal while I was away. ]
*/smk@axiom.UUCP (Steven M. Kramer) (08/03/85)
If you loaded code read-only (-n) or demand-paged (-z), etext
is not necessarily on a R/W page. You must round up to the next
protection unit of the machine in question and copy from there.
Note that the loader forces the start of data on -z and -n files to
be moved away from the text so that they don't share the same page
(or else part of text will be R/W or part of data will be R/O!!).
Also, are you saving the stack area. I find that region is important
in most programs. :-)
--
--steve kramer
{allegra,genrad,ihnp4,utzoo,philabs,uw-beaver}!linus!axiom!smk (UUCP)
linus!axiom!smk@mitre-bedford (MIL)