delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/05/14/13:09:13

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=PEKUgGh3JmM2z3elaYBaqoSTXe62NBQilgZCtJ9nZQCkV3ycStb2L
zm4ekqHhzpEiR8IgviCUX9Yr3s1c5zZl0zOB+kz2cByOxH1wSx64NZPF7NbSbuhD
+aZbvncEWksvlgn0MrU4K8pp3gXwuzV0Bfy8WcDN5+Hmv5rJn7C0MU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=9SnrR9D4VxhM7i/Fgoul709Pfe8=; b=hKoGdSofi4kapu6b1jIprbBMlW1l
oFA0S2TnK0RtFV+XOafkh1k1ZaUAGuUxE+d7XmLKW1E7v2BhHo+kulbD57p4b2XC
KIW2EFa//+Tf+tE0S37m7BXWxvLAQZOznsp36bZRWvfshKTsqPEPiKrDcjHzdssd
3taeNSWxidCSQJo=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2
X-HELO: mho-02-ewr.mailhop.org
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information)
X-MHO-User: U2FsdGVkX1/f0PtGNyiSww7O680ef0e4
Date: Wed, 14 May 2014 13:08:50 -0400
From: Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Debugging sub-processes with gdb
Message-ID: <20140514170850.GC6620@ednor.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <f5boaz0e6qb DOT fsf AT troutbeck DOT inf DOT ed DOT ac DOT uk> <20140514152505 DOT GB6620 AT ednor DOT casa DOT cgf DOT cx> <f5bk39oe5ic DOT fsf AT troutbeck DOT inf DOT ed DOT ac DOT uk>
MIME-Version: 1.0
In-Reply-To: <f5bk39oe5ic.fsf@troutbeck.inf.ed.ac.uk>
User-Agent: Mutt/1.5.20 (2009-06-14)

On Wed, May 14, 2014 at 04:36:59PM +0100, Henry S. Thompson wrote:
>Christopher Faylor writes:
>> If you have control over the code you could have it print a pid, wait,
>> and then attach to it with gdb.  That works.
>
>Understood, will do.

I should have mentioned, as an alternative approach, if you're willing
to rebuild the Cygwin DLL, you can configure and build it with
--enable-debugging.  Then you can set an environment variable
CYGWIN_DEBUG=xemacs

That will start a gdb sessions every time Cygwin runs a program
with 'xemacs' in its name.

Be advised however that --enable-debugging adds some check to the cygwin
dll which can slow it down noticeably and, in some rare situations,
introduce some races which cause crashes that you wouldn't see with
the non-debugging variant.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019