Follow-fork with gdbserver

Daniel Jacobowitz drow@false.org
Wed Aug 23 03:43:00 GMT 2006


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



More information about the Gdb mailing list