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


Eli Zaretskii wrote:
Date: Sat, 21 May 2005 20:30:16 +1000
From: Russell Shaw <rjshaw@netspace.net.au>
Cc: gdb@sources.redhat.com

It'd be better to store the state of every step in to a circular buffer
of size 1000 (the user could change that size with a command).

When you say ``it'd be better'', what is the alternative that you think is worse than your suggestion? What I wrote didn't say how many previous states to remember, nor what data structure to use for that.

Also, I hope you don't mean ``every step'', but rather ``every stop''.
What I suggested didn't involve single-stepping the program, so GDB
can only collect the target state when the target stops, not after
each instruction.

Yes, that's what i meant (every step). It could be configureable so that the policy can be set to every user-stop, every function call, or disabled alltogether. The idea is that you could run from main() until a segfault happens, then "back 10" and step thru the last few actions.

That way, there's only one backwards command to remember, and maybe a
command to change the history buffer size.

That's essentially what I suggested: to have a single command to go back to one of the places where we have enough information to restore the target state.

I was hoping to have target state for all of the last 100 or 1000 steps.


There could be two things the user chooses:

  When you go back to a previous point then start
  stepping, all you see is a replay of what happened, rather than any real
  interactive or live executions happening. When you step past the current
  context, then 'real' simulation is again happening as usual, or

  When you go back to a previous point then start
  stepping, then 'real' simulation is again happening as usual.


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