X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org X-Yahoo-SMTP: jenXL62swBAWhMTL3wnej93oaS0ClBQOAKs8jbEbx_o- Date: Tue, 12 Jul 2011 10:17:14 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: Pthreads and GDB? Message-ID: <20110712141713.GA20589@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: 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) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Tue, Jul 12, 2011 at 06:16:14AM -0400, Jan Chludzinski wrote: >I went to GNU.org to read about GDB and threads since I'm having >trouble working with ptheads under GDB on Cygwin. I notice this on >the GNU.org web site: > >"Warning: These facilities are not yet available on every GDB >configuration where the operating system supports threads. If your GDB >does not support threads, these commands have no effect. For example, >a system without thread support shows no output from `info threads', >and always rejects the thread command, like this:" > >What the level of support for threads with GDB under Cygwin? > >Switching between threads causes seg-faults. Also, I thought that >while you're stepping through one thread, the other threads weren't >running? Shouldn't I be able to set a breakpoint in a thread before >pthread_create() is invoked? Doesn't appear to be the case? Since cygwin1.dll is multithreaded, I routinely set breakpoints which are only hit in a thread. So, yes, gdb is supposed to be multi-thread aware. 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