public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Debugging sub-processes with gdb
Date: Wed, 14 May 2014 15:34:00 -0000	[thread overview]
Message-ID: <20140514152558.GG2436@calimero.vinschen.de> (raw)
In-Reply-To: <f5boaz0e6qb.fsf@troutbeck.inf.ed.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]

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 #2: Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2014-05-14 15:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-14 15:25 Henry S. Thompson
2014-05-14 15:26 ` Christopher Faylor
2014-05-14 15:37   ` LRN
2014-05-14 16:52   ` Henry S. Thompson
2014-05-14 18:00     ` Christopher Faylor
2014-05-14 15:34 ` Corinna Vinschen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140514152558.GG2436@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).