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; 16+ 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] 16+ messages in thread

end of thread, other threads:[~2021-10-04 13:26 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11990-4717@http.sourceware.org/bugzilla/>
2013-02-22 21:49 ` [Bug c++/11990] "can't find linker symbol for virtual table for ..." when printing variables tromey at redhat dot com
2013-02-22 21:54 ` tromey at redhat dot com
2013-02-25 17:18 ` tromey at redhat dot com
2013-03-06 20:05 ` tromey at redhat dot com
2013-04-15 17:30 ` cvs-commit at gcc dot gnu.org
2013-04-15 18:14 ` tromey at redhat dot com
2013-05-01 14:08 ` vz-gdb at zeitlins dot org
2013-05-02 18:55 ` tromey at redhat dot com
2013-05-02 23:03 ` vz-gdb at zeitlins dot org
2013-05-02 23:28 ` vz-gdb at zeitlins dot org
2013-05-02 23:58 ` vz-gdb at zeitlins dot org
2014-02-16 19:30 ` jackie.rosen at hushmail dot com
2014-05-28 19:42 ` schwab at sourceware dot org
2021-10-01 17:11 ` seocontent01 at yandex dot com
2021-10-04 13:26 ` mark at klomp dot org
2010-09-07 12:47 [Bug c++/11990] New: " 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).