This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Follow-fork with gdbserver
- From: Daniel Jacobowitz <drow at false dot org>
- To: Michael Snyder <Michael dot Snyder at palmsource dot com>
- Cc: GDB General ML <gdb at sourceware dot org>, Ewa Matejska <Ewa dot Matejska at palmsource dot com>
- Date: Tue, 22 Aug 2006 23:43:51 -0400
- Subject: Re: Follow-fork with gdbserver
- References: <1156293099.9019.28.camel@localhost.localdomain>
On Tue, Aug 22, 2006 at 05:31:39PM -0700, Michael Snyder wrote:
> Hey Daniel,
>
> How difficult, and how interesting, do you think it would be
> to add follow-fork support to gdbserver for native linux?
I did it once for a customer. It wasn't terribly hard, but it was an
incredibly bad hack, because GDB normally does some futzing around with
breakpoints on fork events; gdbserver doesn't have a breakpoint list,
so it doesn't know what to do. So I had it capture some memory writes
and replay them.
Nowadays gdbserver still doesn't set software breakpoints (Z0/z0), but
it does have most of the infrastructure to do it. So, it would
probably be easier to design the new packets without my ugly hack.
--
Daniel Jacobowitz
CodeSourcery