This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: collecting data from a coring process
- From: Samuel Bronson <naesten at gmail dot com>
- To: Paul Marquess <Paul dot Marquess at owmobility dot com>
- Cc: Dmitry Samersoff <dms at samersoff dot net>, vijay nag <vijunag at gmail dot com>, "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Mon, 5 Sep 2016 18:17:28 -0400
- Subject: Re: collecting data from a coring process
- Authentication-results: sourceware.org; auth=none
- References: <CY1PR0501MB11783F479AF7D639A82FE02F95EC0@CY1PR0501MB1178.namprd05.prod.outlook.com> <CAKhyrx_9GnLTBDKkhW_y4QG+f3xV_SL-Vtg0WN+vU6UXnY-qLA@mail.gmail.com> <CY1PR0501MB1178A955FBE2AAAE65655EAB95EC0@CY1PR0501MB1178.namprd05.prod.outlook.com> <87b59611-f5d1-628d-fd41-85ce6c6eb50b@samersoff.net> <CY1PR0501MB117800AACB41115C303EB9D495E60@CY1PR0501MB1178.namprd05.prod.outlook.com>
On Mon, Sep 5, 2016 at 7:09 AM, Paul Marquess
<Paul.Marquess@owmobility.com> wrote:
> From: Dmitry Samersoff [mailto:dms@samersoff.net]
>
>> Paul,
>>
>> >> 1) Why not dump the information that you are looking for into a file
>> >> in the process signal handler ?
>> >
>> > Would love to, but I have no idea what state the process is in once
>> > the SEGV has been triggered.
[...]
> I know we've had problems with signal handlers causing problems, thus my preference to find a way to have the signal handler code do as little as possible and get all the data collection handled at arm's length by gdb.
You could just spawn (and wait for) your GDB-launching script from the
signal handler; then, the process & stack will still be around for
GDB. I think this is even legal!