[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

undefined vtable: which method was chosen as key?

From: Kenneth Porter
Subject: undefined vtable: which method was chosen as key?
Date: Tue, 22 Sep 2009 11:42:17 +0000 (UTC)
User-agent: Xnews/??.01.30

I've read through the FAQ so I understand the theory behind why I'm getting  
this. But I've defined the first non-inline virtual method explicitly in a 
module and readelf shows that the module doesn't have the vtable.

$ make mathplot.o && readelf -s mathplot.o | c++filt | grep mpLayer | grep 
   215: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND vtable for mpLayer

I'm interpreting that to mean the vtable symbol is an external reference 
because it has zero address and size.

I'm looking through the gcc sources and it looks like the decision to emit 
the vtable is in gcc/cp/class.c in determine_key_method. I'm trying to see 
if there's an easy way to get the compiler to tell me which method it's 
chosen for the key method. (This is on i386, so nothing exotic.)

Should I just throw a printf in there to dump out key methods so I can see 
what's being chosen? How can I get a string with the chosen name from the 
tree type? (I'm digging through the macros in cp-tree.h to see if one will 
provide that for me.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]