On Fri, 2005-06-24 at 12:35 +0300, Efraim Yawitz wrote:
> On Fri, 24 Jun 2005, shimi wrote:
> 
> > 
> > $ pmap -V
> > pmap (procps version 3.2.5)
> > 
> > [this is on gentoo linux]
> > 
> Thanks.
> 
> I already got it from the new Slackware distrib and built it.  Now I want
> to know, how can this be used to dump the memory from a process to a file?
> 
pmap (as its name suggests) is used to tell you things about the memory
map.

Reading memory data from another process is, according to what I recall,
something that the system should protect against (not just writing to
memory space which is not yours, but also reading from there - there are
obvious security implications for not blocking something like that).

The only way I can think of doing that, is, and assuming you've got the
source code, is to use fork() (which makes the kernel copy the whole
memory space of the process into a new process), and inside the child
process, use SIGABRT (man abort), which, IIRC, will make the forked
process die and dump a core, and a core is basically... a memory dump :)
-- 
shimi <[EMAIL PROTECTED]>


=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to