This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [discuss] Support for reverse-execution


Daniel Jacobowitz wrote:

It seems to me that if we give them unique names, the logical parallel
with existing commands may be lost.  But perhaps not.  Let's try for
the full set:
	continue	reverse-continue
	step		reverse-step
	next		reverse-next
	stepi		reverse-stepi
	nexti		reverse-nexti
	until		reverse-until
	advance		reverse-advance
	finish		reverse-finish

I think that's the full set of reversible commands.

reverse-return? <shudder>


> Which of them
don't work?  I agree that reverse-next is a little weak, but everything
else seems OK.  And we aren't limited to one name for things!  We could
add "prev" as an alias to "next" if you like that.

I like these, as being the most informative, with shorter and perhaps more mnemonic versions (such as prev) as aliases. Eli, you should like these because they're somewhat self-documenting (not that we'd want to skimp on the real docs)

We could use r-prefixed commands.  I don't think that helps much, since
we're already planning to offer abbreviations like "rs" and "rni", but
they're my second-favorite choice:
  rcontinue, rstep, rnext, rstepi, rnexti, runtil, radvance, rfinish

We could use "backwards" for everything. Those mostly sound right,
except that backwards has some unfortunate connotations.

What if, in addition to what you describe above, we defined a *prefix* command "backwards" -- which would simply modify the other commands, eg. "backwards continue" (no hyphen) would call continue with whatever parameters would make it proceed backwards (or would call reverse-continue, or whatever).

Maybe this is too many ways to do the same thing, but
it would cost us essentially nothing...

Furthermore, we could implement as many of these interfaces
as we wish, hidden in "maintainer mode" or something, and
try them out -- see how we like them.

> I think
that advance and finish come out as particularly odd:
  backwards-continue, backwards-step, backwards-next, backwards-stepi,
  backwards-nexti, backwards-until, backwards-advance, backwards-finish

This one's kind of nice, we could use suffixes instead.  But
next-backwards is very awkward:
  continue-backwards, step-backwards, next-backwards, stepi-backwards,
  nexti-backwards, until-backwards, advance-backwards, finish-backwards



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]