This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Is Single step into C++ virtual thunk still broken?
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb at sources dot redhat dot com
- Date: Mon, 8 Jul 2002 09:52:30 -0400
- Subject: Re: Is Single step into C++ virtual thunk still broken?
- References: <1026135745.26012.18.camel@pan>
On Mon, Jul 08, 2002 at 02:42:17PM +0100, Daedalus wrote:
> I have waded through the archives but can't find anything newer than 1
> year ago discussing this.
>
> I'm using latest cvs gdb and gcc3.1. and specifiying DWARF-2 debug info.
>
> When I single step into a virtual member function of a polymorphic
> object in my C++ app, the source display heads off to some random line
> in a header file, and another single step takes me back to the next
> source line after the virtual function.
>
> Putting a breakpoint in the actual function being called works as
> expected.
>
> I quote from a message by Andrew Cagney, 28 Jun 2001:
>
> *****************************
> > - Skipping vtable thunks, if necessary
>
>
> I don't know if this was ever discussed on this list. As I understand
> it, v3 virtual function is sometimes called via a ``thunk''. A
> ``thunk'' pulls a rabbit out of a hat (finds the correct object to pass
> to the real function) and then passes control to the real function.
>
> At present, if GDB stepped into a thunk it would find no line info,
> treat it like a library and just skip it - oops, step into virtual
> functions via thunks doesn't work.
>
> One proposed solution is to mimic / generalize the shared library
> mechanism so that GDB will single step through it to the real function.
>
> I think this bug is pretty serious since, GDB will, randomly loose
> control over the target. I certainly think it is more serious than the
> constructor problem.
> *****************************
>
> Is this still broke, or am I missing something?
Probably, I'll look at it. Could you do me the favor of a small test
program?
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer