From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11810 invoked by alias); 18 Mar 2010 20:02:17 -0000 Received: (qmail 11701 invoked by uid 22791); 18 Mar 2010 20:02:16 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from aussmtpmrkpc120.us.dell.com (HELO aussmtpmrkpc120.us.dell.com) (143.166.82.159) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 18 Mar 2010 20:02:12 +0000 X-Loopcount0: from 12.110.134.31 Received: from unknown (HELO M31.equallogic.com) ([12.110.134.31]) by aussmtpmrkpc120.us.dell.com with SMTP; 18 Mar 2010 15:02:10 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Two threads hitting the same break Date: Thu, 18 Mar 2010 20:02:00 -0000 Message-ID: In-Reply-To: <201003181935.58045.pedro@codesourcery.com> References: <201003181935.58045.pedro@codesourcery.com> From: "Paul Koning" To: "Pedro Alves" , 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: 2010-03/txt/msg00149.txt.bz2 Thanks. I'm not sure about using that model -- it doesn't behave in an intuitive fashion. If I have two threads that hit the same break at the same time, I would expect to see both breaks. The Linux code tosses one of them. Given how it picks threads to report, the next time the two threads hit a break, the one that wasn't reported the first time will be reported this time. But the net result is that I only see a portion of the breaks -- half of them if there are two threads. Consider a test case of the form - print something - wait a bit - repeat If I set a break in that loop and keep hitting continue, I see one break per pass through the loop even if there are two threads executing this loop. I'm not sure why the Linux folks chose to make it work that way; I'm not sure I want to copy that behavior. Then again, doing something more obvious might be hard... paul > -----Original Message----- > From: Pedro Alves [mailto:pedro@codesourcery.com] > Sent: Thursday, March 18, 2010 3:36 PM > To: gdb@sourceware.org > Cc: Paul Koning > Subject: Re: Two threads hitting the same break >=20 > On Thursday 18 March 2010 19:26:52, Paul Koning wrote: > > I think I've seen discussion of this sort of issue, possibly in the > > code, but I'm not having much luck finding it. Any suggestions for > the > > right way to handle this? >=20 > See linux-nat.c:cancel_breakpoint. >=20 > -- > Pedro Alves