From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28628 invoked by alias); 31 May 2007 17:23:34 -0000 Received: (qmail 28616 invoked by uid 22791); 31 May 2007 17:23:34 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 31 May 2007 17:23:32 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id BE567982DE; Thu, 31 May 2007 17:23:29 +0000 (GMT) Received: from localhost.localdomain (nc-71-2-221-6.dyn.embarqhsd.net [71.2.221.6]) by nan.false.org (Postfix) with ESMTP id 3996D982DD; Thu, 31 May 2007 17:23:29 +0000 (GMT) Received: by localhost.localdomain (Postfix, from userid 1000) id 57E0B17762E; Thu, 31 May 2007 13:23:29 -0400 (EDT) Resent-From: drow@false.org Resent-Date: Thu, 31 May 2007 13:23:29 -0400 Resent-Message-ID: <20070531172329.GG23651@localhost.localdomain> Resent-To: gdb@sourceware.org, Ulisses Furquim Date: Thu, 31 May 2007 17:23:00 -0000 From: Daniel Jacobowitz To: Ulisses Furquim Cc: gdb@sourceware.org Subject: Re: Problems with multi-threaded application debugging Message-ID: <20070531170448.GB23197@localhost.localdomain> Mail-Followup-To: Ulisses Furquim , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00181.txt.bz2 On Thu, May 31, 2007 at 02:50:12PM +0200, Ulisses Furquim wrote: > Hi, > > I was doing some tests trying to debug a simple multi-threaded > application and noticed some strange gdb behaviors: > > - sometimes when you "continue" gdb doesn't stop at a breakpoint > inside some of the threads; > - sometimes when you try to single step (with "next") all the threads > run until the program exits; I have no idea what these might be. > - I was trying to use the scheduler-locking variable (setting it to > "on"), but it seems I can single step on only one thread. I mean, If I > switch to another thread and try to single step it, gdb switches back > to the previous thread. To be honest, I can't completely remember whether this is supposed to happen still or supposed to be fixed. You need to be using a current version of gdb and gdbserver, but GDB may still be doing something wrong. -- Daniel Jacobowitz CodeSourcery