Date: Sat, 2 Jan 2016 14:41:47 -0800 From: Dieter BSD <dieterbsd@gmail.com> To: freebsd-hackers@freebsd.org Subject: Getting a core dump of a process without killing it? Message-ID: <CAA3ZYrA1NE3mHM=Xh84Ogwon5khw45Oi1XwFiQB7RWFfOTFXEg@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I have a (stopped) process which hopefully has some data in its memory. Is there a way to get a core dump of a process without killing it? Looked in kern_sig.c but it appears that any signal that gives a core dump also kills the process. Created a similar process, sent it a SIGTRAP, looked at the core dump with hexdump and found the data. But of course SIGTRAP also kills the process. Gdb can attach to a process and dump areas of memory, (dump memory filename addr1 addr2) if you can figure out what address range(s) you want. I tried "maint info sections" but no joy. Use too large a range with "dump memory" and gdb fails. There doesn't seem to be a dump everything option. FreeBSD 8.2 [ because 10.1 doesn't work :-( ] on amd64 ps reports that VSZ is 108104.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAA3ZYrA1NE3mHM=Xh84Ogwon5khw45Oi1XwFiQB7RWFfOTFXEg>