rehmi.umcp-cs@Udel-Relay (04/02/83)
From: Khron The Elder <rehmi.umcp-cs@Udel-Relay>
Problem: I put a process out there, and let it run while I go elsewhere and
suck its core image into a file by simulating the hardware and
reading wonderful memory devices. I then stop the process, force
it out to swap by giving myself outrageous amounts of core and
paging hard and fast through them. So it gets (supposedly) paged
out, right? The valid bit goes off when it decides to page out,
whereas fill_on_demand goes on once it actually has moved to disk.
[Let me think this through as I go]. So far so good. And if both
bits go off, then it's time to go check the core map, and/or the
pte for the segment is trying to tell me it's not in core. When
fod is set, this means it holds the block number of the page on
swap.
Bitch 1) There is a mapping between the above and reality (PLEASE tell me
where the above is wrong if it is, and reply directly) only while
the pages are in core, and the fod bit is off, and the phase of
the moon is within epsilon of chi. Otherwise, the above is screwed.
Bitch 2) What is the magical method of summoning useful information from
the coremap? I tried putting it into some readable format, but I
can't find much of a 'core'-lation (bad, I know) between it and
the virtual state of the world.
If you're wondering why I want to do this ugly thing, I want to
eventually create a form of adb/sdb that needn't use the grotesque
ptrace() garbage (yes, they will use some other grotesque garbage)
and needn't have the process as a child, and can get in there fast
to patch a process that's having problems, or just see how a proc
is doing. I want to get this working afore I try again in the kernel.
In short - Help! and Has anyone done this before from user mode? Or are such
doings passe now and pseudo-devices and system calls the "in(_core)" thing?
Thanx, -Rehmi-