Re: [discuss] Support for reverse-execution

Andreas Schwab
2005-05-20T11:37:59Z

"Eli Zaretskii" <eliz@gnu.org> writes:

>> Date: Thu, 19 May 2005 15:00:52 +0200
>> From: Johan Rydberg <jrydberg@virtutech.com>
>> Cc: gdb@sources.redhat.com
>>
>> + add_com ("rnext", class_run, rnext_command,
>> + "Step program until it reaches the previous source line.\n\
>
> "Go backwards until the program reaches the source line before the
> current one."

The beginning or any part of the source line? While the latter is easy to
determine (just step until the source line changes), the former is not
very well defined, since the code for a source line can be intermixed with
code from other source lines. On the other hand, just stepping until the
source line changes is not very useful, since in extreme case you'll just
step back a single insn if the previous command was a forward step and you
won't really undo much of this step.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, MaxfeldstraÃŸe 5, 90409 NÃ¼rnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."