This is the mail archive of the
mailing list for the Cygwin project.
Re: Debugging sub-processes with gdb
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 14 May 2014 13:08:50 -0400
- Subject: Re: Debugging sub-processes with gdb
- Authentication-results: sourceware.org; auth=none
- 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>
- Reply-to: cygwin at cygwin dot com
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
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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple