• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: ZeroLink has wrong symbol?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: ZeroLink has wrong symbol?


  • Subject: RE: ZeroLink has wrong symbol?
  • From: Jeff Laing <email@hidden>
  • Date: Fri, 5 Nov 2004 09:16:45 +1100

> With ZeroLink I get this error when I try to debug:
> ZeroLink: unknown symbol '__ZTv0_n12_NSoD0Ev'
> [snip]
> CLUES:
>   c++filt __ZTv0_n12_NSoD0Ev just echos back the manged
> string--I assume that means it is undefined.

I think here you are experiencing the difference between the C function name
and the label placed into the ASSEMBLER generated.

Typically, C compilers prepend an "_" to all labels that they generate into
an assembly output, in an attempt to ensure namespace isolation - it means
that there is no way that you can mess with the internals of the C compilers
runtime support (as opposed to libraries like stdio)

The linker gets to see these adjusted labels, and those are what it
complains about, not the original function names.

> However, c++filt _ZTv0_n12_NSoD0Ev  (one less '_' ) returns:
> virtual thunk to std::basic_ostream<char, std::char_traits<char>
>  >::~basic_ostream()

This is what I would expect to happen. Lifting off the first '_' is
essentially turning the assembler label back into the C function name, which
is what the C++ mangler has produced.

> If I comment out 'myostream myOut(&sbuf);',  ZeroLink is just fine,
> ie. it has no problem with the direct basic_ostream construction.
>
> When myCharT is  unsigned char, short, or long, I can build and debug
> with ZeroLink just fine! It is only char that seems to cause this
> problem.
>
> Could it be that ZeroLink caches the wrong symbol name for
> ~basic_ostream<char>?

I think its far more likely to be a templating problem - one of the nasty
things about C++ templates is that they are not necessarily evaluated at
COMPILE time, but rather deferred till LINK time. I bet whats happening is
that the template expansion is not being handled by the ZeroLink linker.

But I'm not an expert, I'm guessing from first principles.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: RE: How bad is GDB and C++? (was: GDB and c++ template class)
  • Next by Date: Re: Re How bad is GDB and C++? (was: GDB and c++ template class)
  • Previous by thread: ZeroLink has wrong symbol?
  • Next by thread: Disappearing reference in debugger
  • Index(es):
    • Date
    • Thread