public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11990] New: "can't find linker symbol for virtual table for ..." when printing variables
@ 2010-09-07 12:47 viriketo at gmail dot com
  2010-09-07 13:52 ` [Bug c++/11990] " viriketo at gmail dot com
  0 siblings, 1 reply; 2+ messages in thread
From: viriketo at gmail dot com @ 2010-09-07 12:47 UTC (permalink / raw)
  To: gdb-prs

I'm receiving this message from gdb, that it cannot find a virtual table for a
given symbol.

The session goes like this:
(gdb) print *item
warning: can't find linker symbol for virtual table for `wxSizerItem' value
$4 = warning: can't find linker symbol for virtual table for `wxSizerItem' value
{<wxObject> = {.....}}

This has the annoying effect of 'ddd' not being able to decode what's next. The
warning messages can happen in the middle of the contents printing of an object,
if the object happens to have a member also requiring a virtual table.

I checked with 'readelf -sW' the symbols, and those symbols are properly placed
in the shared object.

I could find one virtual class which gave me the error, and one virtual class
that did not give me that error, both in different shared objects. I will show
the difference in their symbol names.

The object gdb could print without warnings had this vtable symbol:
   232: 000000000059a2e0    32 OBJECT  WEAK   DEFAULT   19 vtable for ObjectName

The objects gdb printed the warning had this vtable symbol:
 11395: 00000000006725e0    96 OBJECT  WEAK   DEFAULT   20 vtable for
wxSizerItem@@WXU_2.8

I think that the trouble comes from the "@@WXU_2.8", the symbol versions. Can it
be that gdb has trouble with them with virtual tables?

Searching the web, I see the 'warning' I comment very often, but I have not
found a discussion on where it comes from. And as it disables me to use 'ddd',
I'd like to know how to get rid of the warning.

In all the shared objects involved, I used gcc 4.4.3 to build them.

-- 
           Summary: "can't find linker symbol for virtual table for ..."
                    when printing variables
           Product: gdb
           Version: 7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: viriketo at gmail dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11990

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/11990] "can't find linker symbol for virtual table for ..." when printing variables
  2010-09-07 12:47 [Bug c++/11990] New: "can't find linker symbol for virtual table for ..." when printing variables viriketo at gmail dot com
@ 2010-09-07 13:52 ` viriketo at gmail dot com
  0 siblings, 0 replies; 2+ messages in thread
From: viriketo at gmail dot com @ 2010-09-07 13:52 UTC (permalink / raw)
  To: gdb-prs


------- Additional Comments From viriketo at gmail dot com  2010-09-07 13:51 -------
To add some information, I rebuilt the shared object that had symbol versions. I
rebuilt it *without* symbol versions (it's build script had a version-script
that I took out).

Having removed the symbol versions, gdb gets the vtables perfectly, and DDD
shows all the object members perfectly too.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11990

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-07 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 12:47 [Bug c++/11990] New: "can't find linker symbol for virtual table for ..." when printing variables viriketo at gmail dot com
2010-09-07 13:52 ` [Bug c++/11990] " viriketo at gmail dot com

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).