This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Is CLONE_VM really needed in gdbserver?
- From: Daniel Jacobowitz <dan at codesourcery dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GDB <gdb at sourceware dot org>
- Date: Tue, 26 Jan 2010 19:08:26 -0500
- Subject: Re: Is CLONE_VM really needed in gdbserver?
- References: <6dc9ffc81001261551j6221db6v88e96713d6dd9497@mail.gmail.com>
On Tue, Jan 26, 2010 at 03:51:38PM -0800, H.J. Lu wrote:
> Hi,
>
> There is a race condition between gdbserver and ld.so on Linux/x86-64:
>
> http://www.sourceware.org/bugzilla/show_bug.cgi?id=11214
>
> Is CLONE_VM really needed? In general, CLONE_VM is a very bad
> idea if there is any symbol lookup in both parent and child processes.
It is necessary because gdbserver supports uClinux. However, on Linux
we might be able to get away with fork (see linux_tracefork_child in
gdb/linux-nat.c).
--
Daniel Jacobowitz
CodeSourcery