On Wednesday 06 June 2007 10:52, Michael MacIsaac wrote:
>Does anyone know of a comparable tool, or another way to dump a program's
>core without terminating? Thanks.
The kernel only dumps core when handling a fatal signal. It does it by
calling do_coredump() from get_signal_to_deliver() in kernel/signal.c when
doing the default action for certain signals, and will always terminate the
process after dumping by calling do_group_exit(). So there is no way to get
the kernel to dump core without terminating the process.
It looks like what google-coredumper does is an in-process core-dump. It says
it makes a "copy-on-write" copy of the process's address space to do this. I
haven't looked at the code to find out the details, though.
I would guess that it is not too hard to do an in-process core-dump, because
you can just traverse the address space map and write it all out. The tricky
part would be saving the registers, which is probably what the assembler code
you mentioned is doing.
- MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390