This is the mail archive of the 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 3/5] range stepping: gdb

> Date: Wed, 15 May 2013 11:23:24 +0100
> From: Pedro Alves <>
> CC:
> >> +@var{end} is the address of the first instruction beyond the step
> >> +range, and @strong{not} the address of the last instruction within it.
> >> +(This has the property that @var{start} == @var{end} single-steps
> >> +once, and only once, even if the instruction at @var{start} jumps to
> >> +@var{end}.)
> > 
> > This sentence in parentheses got me completely confused.  Before
> > reading it, I thought I understood what is this about; now I don't.
> > In particular, if START is equal to END, then how in the world could
> > the instruction at START jump to END?
> Sorry, I had that typo in the gdbserver code as well, fixed it
> there, but missed this one.
> It should read, even if the instruction at @var{start} jumps to @var{start}.
> vCont;r first steps, then checks.  IOW:
>  vCont ;r ADDR1,ADDR1
> is equivalent to (and could be thought to supersede):
>  vCont ;s
> > And if END is excluded from the
> > range, then why when START equals END do we step at all?  Please
> > explain.
> It's just a design decision.  I recall at least one target I saw I worked
> with that supported range stepping, and it didn't even a distinction
> between range vs no-range step commands.  The way to do a single step
> was to pass both addresses the same.  I find it a better design than
> requiring the target do one current-address check _before_ stepping,
> and another _after_ single-stepping.

Doesn't this mean that these two use cases are explicit exceptions
from the rule that END is excluded?  If so, we should describe them as
exceptions, not use them as evidence for the rule (which they
evidently violate).

Or did I misunderstand again?

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