Getting pissed off by gdb. Please help with stepping in.

Doug Evans dje@google.com
Thu Mar 18 15:28:00 GMT 2010


On Thu, Mar 18, 2010 at 8:10 AM, Doug Evans <dje@google.com> wrote:
> The behaviour Pavel describes in his message, but which I do not see, is this:
>
> (gdb) f
> #0  bar () at stepout.c:4
> 4       int bar () { return 1; }
> (gdb) s
> main () at stepout.c:12
> 12        return 0;
> (gdb)
>
> Note that we've stepped out of bar, into foo, and back out of foo.

Although ...

Pavel wrote:
> [...] My step out of 'bar' command caused
> call to 'foo' to execute as well. But I just wanted to step out of 'bar'
> but not have 'foo' executed yet.

could instead mean that we've stepped into foo, i.e. gdb's current
behaviour.  Heh.
Still, I've also tripped over doing a step at the end of a function
and ended up not back in the caller, but in another subroutine - and
wish that hadn't happened.



More information about the Gdb mailing list