From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22894 invoked by alias); 9 May 2007 18:46:28 -0000 Received: (qmail 22886 invoked by uid 22791); 9 May 2007 18:46:27 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 09 May 2007 18:46:25 +0000 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 28CD64B267; Wed, 9 May 2007 13:46:24 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id EA9674B262; Wed, 9 May 2007 13:46:23 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1HlrB9-0003Ze-FK; Wed, 09 May 2007 14:46:23 -0400 Date: Wed, 09 May 2007 18:46:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: Luis Machado , gdb-patches@sourceware.org Subject: Re: [RFC] "single step" atomic instruction sequences as a whole on PPC Message-ID: <20070509184623.GA13382@caradoc.them.org> Mail-Followup-To: Jan Kratochvil , Luis Machado , gdb-patches@sourceware.org References: <200705091433.l49EXOfG024847@d12av02.megacenter.de.ibm.com> <1178733926.4754.1.camel@localhost> <20070509181206.GA6543@caradoc.them.org> <1178734875.4754.6.camel@localhost> <20070509183319.GA29991@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070509183319.GA29991@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-05/txt/msg00137.txt.bz2 On Wed, May 09, 2007 at 08:33:19PM +0200, Jan Kratochvil wrote: > Hi Luis, > > please check the attached two testcases and run them at least 100x etc. > > Unfortunately the threaded one fails for me in some 7% of cases IMO due to > a race at the `infrun.c' line: > remove_status = remove_breakpoints (); > > The whole idea of running all the threads of the program to step over the > atomic sequence is problematic as the other threads may hit the inserted > breakpoint. While this cases is handled it contains a race. > > One way would be to use some temporary: > if (scheduler_mode == schedlock_off) > scheduler_mode = schedlock_step; > > But I believe one could use the PPC simulation code instead of the whole > breakpoint/resume way? This has come up before; I think we need to come up with a better default behavior for "step" that does not do this. Here's the last discussion I remember: http://sourceware.org/ml/gdb/2006-11/msg00211.html Should I try again? I hadn't thought about this case, of trying to step over a touchy atomic sequence; I don't see any way we could make it work if we let more than one thread run at once. -- Daniel Jacobowitz CodeSourcery