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: [PATCH 5/7] range stepping: New command 'maint set range stepping'


> From: Yao Qi <yao@codesourcery.com>
> Date: Thu, 11 Apr 2013 10:43:40 +0800
> 
> On 03/18/2013 11:45 AM, Eli Zaretskii wrote:
> >> Don't have any special reasons to do this.  The range stepping should be
> >> >always on if target supports, and it can be turned off for some
> >> >"maintenance purpose", so I set this command as a maintenance
> >> >command.
> > What would be the possible reasons to turn this feature off?
> >
> > Once we have the reasons, we could try thinking whether or not they
> > are limited to GDB maintenance.
> 
> Range-stepping is useful to speed up some operations, so users don't
> have to turn it off.  The reason turning it off could be that the
> remote stub has a bug in supporting range stepping, so we have to
> disable it in GDB side.

To me, this means that the command is not really a maintenance
command.  It is a user option, albeit one that is not expected to be
used frequently.

> I considered to name the command to "set remote range-stepping", but
> range-stepping is not specific to remote target, and it can be
> implemented on native target as well.  So "set remote range-stepping"
> is not a good choice.  I also considered "set range-stepping", but
> unable to find a reasonable place for documentation on it.

How about "Continuing and Stepping"?

> In V2, I don't update the command name.

> +@kindex maint set range-stepping
> +@kindex maint show range-stepping
> +@cindex range-stepping
> +@item maint set range-stepping
> +@itemx maint show range-stepping
> +@vindex $range_stepping_counter
> +Control whether to do stepping in an address range.  The debugger convenience
> +variable @samp{$range_stepping_counter} contains the number of range stepping
> +@value{GDBN} has performed.

This is OK, but it doesn't really explain what the setting does.  The
doc string of the command is much better:

> +  add_setshow_boolean_cmd ("range-stepping", class_maintenance,
> +			   &use_range_stepping, _("\
> +Enable or disable range-stepping."), _("\
> +Show whether range-stepping is enabled."), _("\
> +If On, GDB will tell the target to do stepping a range of address.\n\
> +This will speed up stepping a line of source file.\n\
> +If off, GDB will not use it, even if such is supported by the \n\
> +target"),

Except that "do stepping a range of address" is not really correct.
How about this rewording:

  If On, GDB will instruct the target to single-step through all the
  instructions in a range of addresses, and report back only once at
  the end.  This reduces the amount of communication during stepping.


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