On May 14 16:10, Henry S. Thompson wrote:
> I'm trying to debug a problem with xemacs that involves the child
> process forked when you execute M-x shell.
> 
> None of the mechanisms in the gdb documentation for choosing to step
> into the child process (instead of the parent) after a fork() seem to
> work for me.  That is, in particular, setting follow-for-mode to child
> still leaves me in the parent after stepping over a fork().
> 
> Setting detach-on-fork to 'off' also seems to have no effect.
> 
> Have I misunderstood something, or does this aspect of gdb just not
> work under cygwin (x86_64, 1.7.29-2)?

No, it doesn't, it has never been implemented.  This would require
some extensions to GDB as well as the Cygwin DLL, given that Windows
is not quite up to speed in terms of fork.

As a workaround, you could tweka emacs to sleep at certain points in the
code, and then attach to the child process with a second GDB.  Granted,
it's a bit of a hassle, but it works.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp7BWuD1lSo5.pgp
Description: PGP signature

Reply via email to