Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Jan 2016 23:53:10 +0100
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        Dieter BSD <dieterbsd@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Getting a core dump of a process without killing it?
Message-ID:  <CAPQ4ffsqTbC7HwPDAuiUsZqpLofHfxwnKJpBX76TqHe%2BRJGGEA@mail.gmail.com>
In-Reply-To: <CAA3ZYrA1NE3mHM=Xh84Ogwon5khw45Oi1XwFiQB7RWFfOTFXEg@mail.gmail.com>
References:  <CAA3ZYrA1NE3mHM=Xh84Ogwon5khw45Oi1XwFiQB7RWFfOTFXEg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, January 2, 2016, Dieter BSD <dieterbsd@gmail.com> wrote:

> 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.


Take a look at gcore command.


> _______________________________________________
> freebsd-hackers@freebsd.org <javascript:;> mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org
> <javascript:;>"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffsqTbC7HwPDAuiUsZqpLofHfxwnKJpBX76TqHe%2BRJGGEA>