Re: gdb-5.x and step over inline functions

Daniel Jacobowitz
2002-08-19T15:48:40Z

On Sun, Feb 24, 2002 at 01:34:15PM -0500, Daniel Jacobowitz wrote:
> On Sun, Feb 24, 2002 at 08:09:11PM +0200, Iso-H wrote:
> > On Sun, 24 Feb 2002, Iso-H wrote:
> >
> > > On Sun, 24 Feb 2002, Daniel Jacobowitz wrote:
> > >
> > > > On Sun, Feb 24, 2002 at 03:14:00PM +0200, Iso-H wrote:
> > > > >
> > > > > On Sun, 24 Feb 2002, Eli Zaretskii wrote:
> > > > >
> > > > > >
> > > > > > On Sun, 24 Feb 2002, Iso-H wrote:
> > > > > >
> > > > > > > Is there any way to step over inline functions
> > > > > > > when using gdb >= 5.1 ? Some (commandline or other)option
> > > > > > > perhaps?
> > > > > > ....
> > > >
> > > > Could you provide a small testcase, with source and a compile
> > > > commandline?
> > >
> > > It seems to be so that it is difficult to create
> > > just simple "demo", but I'll try...
> > >
> >
> > Ok. here it is; one file only ;)
>
> > As you can see, gdb doesn't show "f_func", but Demo_t's
> > constructor instead !
>
> Thanks! I think I see what's going on; I'll take a better look at it
> later tonight.

And, eight months later...

This is unfortunately a GCC bug. The debug information says that the
beginning of the function is on line 17, in the inline constructor;
nothing GDB can do about that. I'm not quite sure if this is fixed or
avoided in GCC 3.1, but the problem doesn't show up.

If you use GCC 3.1, you'll notice that list behaves properly but break
drops you in an inline function; that's symptomatic of two things:
- GDB's lack of proper support for inline functions
- GDB's prologue skipping, as Andrew was discussing this weekend.

Both of these should be resolved but there's no clear time frame on
either.

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer