RE: GDB MI Reverse Commands added [2 of 3]

Jakob Engblom
2009-08-27T08:26:58Z

> >   Resumes the execution of the inferior program until a breakpoint is
> > ! encountered, or until the inferior exits. If the @samp{--reverse}
> ^^
> Two spaces between sentences, please (here and elsewhere).

Will do.

> > ! option is specified, resumes the reverse execution of the inferior
> > ! program until a breakpoint is encountered, or until the inferior
> > ! exits.
>
> How can you exit in reverse? I think you can only get to the
> beginning of `main', no?

It really depends on how your backend works... there is no necessary
relationship between some function called "main" and where revexec starts.
First of all, in a full-system reverse debug case, it is quite reasonable to
"exit backwards" and get to the point BEFORE the program started. Just like you
can get to AFTER exit if you let the program run its course.

It gets even funkier if you let the backend be OS aware. In this case, the
target program is only being debugged when actually execution on some
targetsystem processor. At other times, there is no execution activity, as the
program is not running. Here also, you can easily see how a mistaken reverse
just goes back to before the program even existed, essentially a limbo analogous
to after exit.

There is also normally a point in time where reverse starts being available.
That could be when the user turns it on DURING the execution of program, or the
first instruction of a booting machine, or some other event horizon before which
we have no information. On a hardware trace box, it just the start of the
sliding window of visibility.

So I think this makes sense, no?

Best regards,

/jakob

_______________________________________________________

Jakob Engblom, PhD, Technical Marketing Manager

Virtutech                   Direct: +46 8 690 07 47
Drottningholmsvägen 22      Mobile: +46 709 242 646
11243 Stockholm             Web:    www.virtutech.com
Sweden
________________________________________________________