Re: [discuss] Support for reverse-execution

Eli Zaretskii
2005-05-20T14:41:18Z

> From: Andreas Schwab <schwab@suse.de>
> Cc: Johan Rydberg <jrydberg@virtutech.com>, dan@shearer.org,
> gdb@sources.redhat.com
> Date: Fri, 20 May 2005 13:37:48 +0200
>
> > "Go backwards until the program reaches the source line before the
> > current one."
>
> The beginning or any part of the source line?

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.

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.