[RFA] Reverse Debugging, 3/5

Michael Snyder msnyder@vmware.com
Mon Oct 6 21:22:00 GMT 2008


Pedro Alves wrote:
> On Monday 06 October 2008 21:51:39, Michael Snyder wrote:
>> Pedro Alves wrote:
>>> Hi Michael,
>>>
>>> Shouldn't failing to find ones
>>> direction always be an error (hence an error call from inside
>>> target_get_execution_direction, or something alike).
>> Targets that don't implement reverse return EXEC_ERROR,
>> rather than EXEC_FORWARD.  It was an early interface
>> design decision, and I'm not sure if I can remember the
>> justification after over 2 years, but I made it
>> consciously -- it seemed to simplify things.
>>
> 
> ...  Okay.  If nobody else remembers why, and I throw a
> later patch at you to change this, please don't be mad
> at me.  :-)

So long as you can argue that it makes things better.
;-)


>>>> +        keep going back to the call point).  */
>>>> +      if (stop_pc == ecs->event_thread->step_range_start &&
>>>> +         stop_pc != ecs->stop_func_start &&
>>>> +         target_get_execution_direction () == EXEC_REVERSE)
>>>> +       {
>>>> +         ecs->event_thread->stop_step = 1;
>>>> +         print_stop_reason (END_STEPPING_RANGE, 0);
>>>> +         stop_stepping (ecs);
>>>> +       }
>>>> +      else
>>>> +       {
>>>> +         keep_going (ecs);
>>>> +       }
>>> Unneeded braces.
>> Don't you think it's more readable if the if block
>> and the else block match?
> 
> Not really, and it's what the GDB/GNU coding standards prefer...

OK, good enough for me.

  > I'm not going to argue about these issues, but, personally, and to
> stick with the standard, I do things like this a lot:

You got it.

>>>> +      ecs->event_thread->step_range_start = stop_func_sal.pc;
>>>> +      ecs->event_thread->step_range_end   = stop_func_sal.end;
>>> Somethings fishy with the whitespace.     ^
>> I just like things to line up when possible!
>> ;-)
> 
> To me, visual vertical aligment is more distracting than good.  It
> distract me from the right -> left assignment flow.  But, that's
> just me.  I'm not going to make a bid deal out of it.

How about if I give you two out of three?   ;-)




More information about the Gdb-patches mailing list