This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
RE: Getting pissed off by gdb. Please help with stepping in.
I'd say it is useful because it matches the documentation. "s" is
documented as "run until you're at a different source line". In
foo(bar()), the source line you come to after exit from bar() is the
call to foo(), not the first line of foo -- that would take "s 2".
paul
> -----Original Message-----
> From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On
> Behalf Of Eli Zaretskii
> Sent: Thursday, March 18, 2010 2:31 PM
> To: Doug Evans
> Cc: temp@sourceboost.com; gdb@sourceware.org
> Subject: Re: Getting pissed off by gdb. Please help with stepping in.
>
> > Date: Thu, 18 Mar 2010 08:10:41 -0700
> > From: Doug Evans <dje@google.com>
> > Cc: temp@sourceboost.com, gdb@sourceware.org
> >
> > Here's what gdb 7.1 does:
> >
> > (gdb) f
> > #0 bar () at stepout.c:4
> > 4 int bar () { return 1; }
> > (gdb) s
> > foo (x=1) at stepout.c:6
> > 6 void foo (int x) { g = x; }
> > (gdb)
> >
> > Note that we've stepped out of bar and into foo.
> >
> > Here is what Pavel is expecting instead:
> >
> > (gdb) f
> > #0 bar () at stepout.c:4
> > 4 int bar () { return 1; }
> > (gdb) s
> > 0x00000000004003b7 in main () at stepout.c:11
> > 11 foo (bar ());
> > (gdb)
>
> Thanks. But why is ``what Pavel is expecting'' useful? What use-case
> does it handle that the v7.1 behavior does not?