public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "dodji at redhat dot com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug python/10953] gdb.Type does not give access to Base classes Date: Wed, 18 Nov 2009 08:08:00 -0000 [thread overview] Message-ID: <20091118080837.6011.qmail@sourceware.org> (raw) In-Reply-To: <20091113155536.10953.andre.poenitz@nokia.com> ------- Additional Comments From dodji at redhat dot com 2009-11-18 08:08 ------- The short story is that the "Derived" type is considered "not complete" by GCC - in the compilation unit main.cpp - so, no debug info is emitted for its *definition*, in that compilation unit. The DIE describing "Derived" then has a DW_AT_declaration set. So GDB has to go lookup the DIE of the *definitin* of "Derived" in another compilation unit. Now I guess the outstanding question is "why is Derived considered not complete?". GCC implements a scheme to reduce debug info size. In that scheme, when a type has as virtual table (like Derived, because it has a virtual destructor declared), GCC only emits full debug info for said type _only_ if the virtual table is emitted. In this case, as the virtual destructor of Derived is not *defined* in main.cpp, no virtual table is emitted in that compilation unit. I guess the virtual table for Derived will be emitted in another compilation unit where the virtual destructor would be emitted. To wrap things up in another way, no virtual destructor defined in current CU => no vtable emitted for Derived in current CU => no full debug info for Derived in current CU => GDB has to fetch the full debug info for Derived in another CU. -- http://sourceware.org/bugzilla/show_bug.cgi?id=10953 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
next prev parent reply other threads:[~2009-11-18 8:08 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-11-13 15:55 [Bug python/10953] New: " andre dot poenitz at nokia dot com 2009-11-17 17:03 ` [Bug python/10953] " pmuldoon at redhat dot com 2009-11-18 8:08 ` dodji at redhat dot com [this message] 2009-11-24 17:06 ` pmuldoon at redhat dot com 2009-11-24 17:27 ` pmuldoon at redhat dot com 2010-05-26 13:54 ` andre dot poenitz at nokia dot com 2010-05-26 14:24 ` andre dot poenitz at nokia dot com 2010-05-26 15:07 ` andre dot poenitz at nokia dot com 2010-08-11 20:54 ` tromey at redhat dot com 2010-08-11 21:14 ` pmuldoon at redhat dot com 2010-08-20 18:27 ` tromey at redhat dot com 2010-08-20 18:34 ` tromey at redhat dot com 2010-08-23 20:31 ` tromey at redhat dot com
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=20091118080837.6011.qmail@sourceware.org \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /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: linkBe 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; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).