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

> From: Pedro Alves <>
> Date: Tue, 14 May 2013 20:10:47 +0100
> When user issues the "step" command on the following line of source,
>    a = b + c + d * e - a;
> GDB single-steps every single instruction until the program reaches a
> new different line.

I always thought that GDB sets a temporary breakpoint at the end, and
then lets the target run freely.  Why not?

> +@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?  And if END is excluded from the
range, then why when START equals END do we step at all?  Please

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