Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daedalus <daedalus@projecticarus.com>
To: gdb@sources.redhat.com
Subject: Is Single step into C++ virtual thunk still broken?
Date: Mon, 08 Jul 2002 06:47:00 -0000	[thread overview]
Message-ID: <1026135745.26012.18.camel@pan> (raw)

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?

Andrew Walrond
Project Icarus


             reply	other threads:[~2002-07-08 13:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-08  6:47 Daedalus [this message]
2002-07-08  6:52 ` Daniel Jacobowitz
2002-07-09  8:56 Daedalus
2002-07-09  9:27 ` Daniel Jacobowitz
2002-07-09 11:44   ` Daedalus
2002-07-09 11:51     ` Daniel Jacobowitz
2002-07-09 13:10       ` Daedalus
     [not found]         ` <20020709202005.GA23405@nevyn.them.org>
2002-07-09 16:13           ` Daedalus
2002-07-09 14:14 Daedalus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1026135745.26012.18.camel@pan \
    --to=daedalus@projecticarus.com \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox