From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18721 invoked by alias); 1 Dec 2006 01:02:08 -0000 Received: (qmail 18710 invoked by uid 22791); 1 Dec 2006 01:02:05 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Fri, 01 Dec 2006 01:01:56 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1Gpwmk-00011R-Rr; Thu, 30 Nov 2006 20:01:50 -0500 Date: Fri, 01 Dec 2006 01:02:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: Michael Snyder , gdb@sourceware.org Subject: Re: Single stepping and threads Message-ID: <20061201010150.GA3849@nevyn.them.org> Mail-Followup-To: Joel Brobecker , Michael Snyder , gdb@sourceware.org References: <20061129052942.GA16029@nevyn.them.org> <20061129055915.GM9968@adacore.com> <20061129132535.GA28834@nevyn.them.org> <20061129163844.GN9968@adacore.com> <1164929776.14460.36.camel@localhost.localdomain> <20061130235515.GI3491@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20061130235515.GI3491@adacore.com> 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: 2006-12/txt/msg00000.txt.bz2 On Thu, Nov 30, 2006 at 03:55:15PM -0800, Joel Brobecker wrote: > > Default on would be a disaster -- most threaded programs would > > not behave even remotely the same under the debugger as they would > > solo. > > > > In fact, many would deadlock almost immediately. > > Something just occured to me that was clear but maybe isn't. Is the > scheduling affected when you do a "continue"? I assumed that, if you > do a "run" or "continue", the actual scheduling policy is irrelevant, > and all threads are resumed. No, the options are basically never, PTRACE_SINGLESTEP only, or PTRACE_SINGLESTEP and PTRACE_CONT. With "on", no other thread ever runs. It's only useful in very specific cases. An option different to any of the ones we've discussed so far, but that I think you're expecting from the current "on", would be one that only applies to the step and next commands. I still think "step" is more useful a default than we have now, though. -- Daniel Jacobowitz CodeSourcery