This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin 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]

RE: Cygwin-gdb can't find linker symbol for virtual table


Josh,

I can confirm the below.  It actually occurs whenever Object has any
virtual function (doesn't have to be the destructor).  It also occurs when
gcc is given a "-ggdb" option instead of "-g"...
	Igor

On Wed, 7 May 2003, Julin, Joshua wrote:

> I've verified that this problem occurs on multiple cygwin installations.
> One of them was a brand new installation.
>
> A summary of the problem:
> Cygwin-gdb doesn't handle classes with virtual destructors properly.
> It prints out a warning "can't find linker symbol for virtual table"
> whenever a member variable is printed.
> I've verified that this problem does NOT occur on linux.
> This problem causes havoc when using insight.
>
> How to recreate the problem in 3 easy steps:
> ############# step 1: create josh.cpp  ###############
> class Object
> {
> public:
>     int x;
>     virtual ~Object() { }
> };
> int main()
> {
>     Object * obj = new Object;
> }
>
> ############# step 2: build josh.cpp  ###############
> g++ -g -o josh josh.cpp
>
> ############# step 3: run gdb  ######################
> gdb josh
> b main
> r
> n
> p obj->x
>
> #####################################################
> gdb will generate this warning: (which it shouldn't)
> warning: can't find linker symbol for virtual table for `Object' value
>
> Thanks for any help,
> Josh

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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