This is the mail archive of the gdb-prs@sourceware.org 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]

[Bug c++/11990] New: "can't find linker symbol for virtual table for ..." when printing variables


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.


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