This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: Fix crash on i386 (%gs-)threaded programs using execve(2)
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 21 Jul 2006 14:44:21 -0400
- Subject: Re: RFC: Fix crash on i386 (%gs-)threaded programs using execve(2)
- References: <20060614105510.GA12067@host0.dyn.jankratochvil.net> <20060614142552.GA15021@nevyn.them.org> <20060615203519.GA9603@host0.dyn.jankratochvil.net> <20060721181556.GA9150@lace.redhat.com>
On Fri, Jul 21, 2006 at 08:15:57PM +0200, Jan Kratochvil wrote:
> Hi Daniel,
>
> I am now copyright assignment compliant (as Red Hat employee).
>
> The mail below was never replied; the patch still applies to the latest CVS.
> Could you please review it?
Turning on MAY_FOLLOW_EXEC is not a good idea. No one really knows how
that behavior works, a lot of it doesn't, and the way it implicitly
changes the symbol file is very disorienting. Please don't mix it up
with the fix for your current bug.
It seems to me that you need thread_db_wait to check for EXECD, and pop
the threading target off the stack when it happens. Maybe, if you want
to be fancy, figure out the right place to push itself back on - but
that's more troublesome to get right.
unpush_target (&thread_db_ops);
using_thread_db = 0;
wipe the thread list?;
return some the underlying process pid;
--
Daniel Jacobowitz
CodeSourcery