This is the mail archive of the gdb@sources.redhat.com 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: Is Single step into C++ virtual thunk still broken?


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


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