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: List-Subscribe: List-Archive: List-Post: List-Help: , 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 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: <20140514152505 DOT GB6620 AT ednor DOT casa DOT cgf DOT cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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