This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
Re: gdb/2420: gdb SEGV with detach-on-follow=off
- From: Daniel Jacobowitz <drow at false dot org>
- To: nobody at sources dot redhat dot com
- Cc: gdb-prs at sources dot redhat dot com,
- Date: 5 Mar 2008 15:08:04 -0000
- Subject: Re: gdb/2420: gdb SEGV with detach-on-follow=off
- Reply-to: Daniel Jacobowitz <drow at false dot org>
The following reply was made to PR gdb/2420; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@false.org>
To: tromey@redhat.com
Cc: gdb-gnats@sources.redhat.com
Subject: Re: gdb/2420: gdb SEGV with detach-on-follow=off
Date: Wed, 5 Mar 2008 10:04:18 -0500
On Sun, Mar 02, 2008 at 05:06:27PM -0000, tromey@redhat.com wrote:
> I was pleased to find out about detach-on-fork = off.
> I tried running gdb on gcc, to see I could end up debugging cc1:
You may have better luck with "catch fork", then "set follow-fork-mode
child" when you reach the appropriate fork for cc1. detach-on-fork
off will leave GDB with both gcc and cc1 attached, which have
different symbol files.
> clear_lwpid_callback unconditionally references thread->private, which is NULL.
> Adding a check to avoid this fixes the crash for me.
thread->private should never be NULL; it means that the common code
added a thread instead of the native Linux code, so the internal state
of the native Linux code is inconsistent. This happens sometimes when
GDB is confused about ptid_t's.
--
Daniel Jacobowitz
CodeSourcery