From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23996 invoked by alias); 8 Jul 2002 13:52:17 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23971 invoked from network); 8 Jul 2002 13:52:16 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 8 Jul 2002 13:52:16 -0000 Received: from dsl254-114-096.nyc1.dsl.speakeasy.net ([216.254.114.96] helo=nevyn.them.org) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17RYw3-0000lk-00 for ; Mon, 08 Jul 2002 08:52:15 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17RYwI-0003e3-00 for ; Mon, 08 Jul 2002 09:52:30 -0400 Date: Mon, 08 Jul 2002 06:52:00 -0000 From: Daniel Jacobowitz To: gdb@sources.redhat.com Subject: Re: Is Single step into C++ virtual thunk still broken? Message-ID: <20020708135230.GA13995@nevyn.them.org> Mail-Followup-To: gdb@sources.redhat.com References: <1026135745.26012.18.camel@pan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1026135745.26012.18.camel@pan> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00081.txt.bz2 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