Mail Archives: cygwin/2003/05/07/15:22:12
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 AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT 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/
- Raw text -