From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29714 invoked by alias); 9 Jun 2006 14:12:38 -0000 Received: (qmail 29685 invoked by uid 22791); 9 Jun 2006 14:12:36 -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, 09 Jun 2006 14:12:14 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1Fohic-0007NQ-U0; Fri, 09 Jun 2006 10:12:11 -0400 Date: Fri, 09 Jun 2006 14:28:00 -0000 From: Daniel Jacobowitz To: John Yates Cc: PAUL GILLIAM , gdb@sources.redhat.com Subject: Re: Instrcutions that must not be stepped. Message-ID: <20060609141210.GA28306@nevyn.them.org> Mail-Followup-To: John Yates , PAUL GILLIAM , gdb@sources.redhat.com References: <4D87F853B8020F4888896B1507DC0F090268F0@mail2.netezza.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D87F853B8020F4888896B1507DC0F090268F0@mail2.netezza.com> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-06/txt/msg00063.txt.bz2 On Fri, Jun 09, 2006 at 09:49:54AM -0400, John Yates wrote: > Daniel Jacobowitz writes: > > > Nope. You'd have to add one. And, you'd have to be able to tell > > whether you were in the middle of a GDB-automated step or a user stepi; > > stepping multiple instructions when the user asked for one is probably > > just confusing. > > To whom or what? I would be quite happy if gdb did the right thing > and output a message to the effect that an atomic sequence was indeed > treated as atomic. That is the count of instructions stepped changed > by one for any number of failed attempts and then one final successful > execution of the entire atomic sequence. If we warn about it, then it's not so confusing :-P There are plenty of other potential issues here. For instance, we'd need to check for branches inside the atomic sequence; otherwise we could completely lose control. > > Reading the instruction before stepping is going to slow down single > > stepping. Is there some other way we can handle this? > > The overhead could be ameliorated by having the status returned from > a completed single step include an optional assertion that if gdb were > to step again without altering the pc or the contents of memory at the > address referenced by the pc then that step would initiate an atomic > sequence. There is no way to do this for most targets. Paul's probably talking about native PowerPC GDB, not any kind of remote stub. Even at that point, I think the performance impact here would be unacceptable; the repeated single step path is one of the few time-sensitive bits of GDB. -- Daniel Jacobowitz CodeSourcery