This is the mail archive of the gdb-patches@sourceware.org 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: [reverse RFA] no singlestep-over-BP in reverse


Agree with you.

And I think Maybe need add a test for it.
I think is:
1. There is a statement that set the value of a variable.
For example:
a = 1;
2. Before this statement, the value of this variable is not same with new value.
3. Set a breakpoint on this statement, And check the value of this
variable when forward execute and reverse execute program break by
this breakpoint. If the value is the new value, fail. If is the old
value, pass.


Thanks,
Hui


On Wed, Sep 17, 2008 at 02:42, Michael Snyder <msnyder@vmware.com> wrote:
> teawater wrote:
>>
>> I think maybe some reverse target (in the future?) need it.
>> Someone already know it already deal the breakpoint. But the others
>> will not know. Maybe I will change inside record to second type.
>>
>>
>> If this single step affect some target, how about let target choice it
>> with itself?
>
> At the moment, my opinion is that gdb needs to be able
> to expect consistent behavior from the target(s).
>
> And I believe that consistent behavior / semantics should be:
>
>   If you tell me that you are stopped at instruction 1000,
>   regardless of whether you were going forward or backward
>   when you got there, then I will expect that if I tell you
>   to execute forward, you will execute the instruction at
>   1000.
>
> Therefore the machine state at this point should reflect
> the state BEFORE any side effects of the forward execution
> of that instruction.
>
> This is how it is for forward execution, and it only makes
> sense to expect the same for reverse execution.  Any variables
> that are changed by the instruction should have their pre-
> execution values.
>
>


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