From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25498 invoked by alias); 20 May 2005 22:14:50 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 25483 invoked from network); 20 May 2005 22:14:46 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 20 May 2005 22:14:46 -0000 Received: from drow by nevyn.them.org with local (Exim 4.50) id 1DZFlS-000357-0M; Fri, 20 May 2005 18:14:42 -0400 Date: Fri, 20 May 2005 22:14:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Andreas Schwab , jrydberg@virtutech.com, dan@shearer.org, gdb@sources.redhat.com Subject: Re: [discuss] Support for reverse-execution Message-ID: <20050520221441.GA11623@nevyn.them.org> Mail-Followup-To: Eli Zaretskii , Andreas Schwab , jrydberg@virtutech.com, dan@shearer.org, gdb@sources.redhat.com References: <20050519012254.GZ19642@erizo.shearer.org> <428C8E04.3000305@virtutech.com> <01c55d27$Blat.v2.4$69471120@zahav.net.il> <01c55d49$Blat.v2.4$91583500@zahav.net.il> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <01c55d49$Blat.v2.4$91583500@zahav.net.il> User-Agent: Mutt/1.5.8i X-SW-Source: 2005-05/txt/msg00249.txt.bz2 On Fri, May 20, 2005 at 05:37:17PM +0300, Eli Zaretskii wrote: > That's an interesting subtle point. At first I wanted to say "the > former", but then I remembered the issue with moving a word forward > and backward in editors. With some editors, such as Emacs, > forward-word ends up one character _before_ the beginning of the next > word, while backward-word ends up on the first character of the > previous word. Other editors end up on the first character of a word > with either forward or backward movement. More precisely, emacs' forward-word appears to put your cursor at the end of the current word, unless it was already there, in which case you go to the end of the next word. Similarly previous-word takes you to the beginning of the current word, unless you're already there. [The difference from what Eli wrote is purely pedantic - try it with multiple spaces between words. Not an issue for us :-)] > So it could make sense for GDB to stop at the _last_ instruction of > the previous source line when we move backwards by lines. The > question is, will this be useful for the user. I'm not sure; perhaps > they will want to skip all the code of the line and stop before its > first instrcution, like "next" does. Even the Emacs idea would work: back to the beginning of this source line. I think that beginning of the previous source line will be the most generally useful; the beginning of source lines is a more useful place for the debugger to go than the end, because the interface is much more apparent that the line "really" hasn't been execute yet. In any case, this is a subtle point - let's flag this subthread and make sure we write it down! And test it, if possible! :-) -- Daniel Jacobowitz CodeSourcery, LLC