Problem with template debug symbols

Problem with template debug symbols

{icl5.0+ vc60++ sp5 WinXP template linking debug symbol}

Anyone had problem debugging templates because symbol names generation seems to fail? (we see a mangled name instead of an intelligible one i.e.: ?$TClassUnsigned@$08::TClassUnsigned() instead of DEBUGNAME!TClassUnsigned<9>::TClassUnsigned() )

Here's an except of code that shows the problem.

Debug info: microsoft only or both (ms + coff)
Separate types: on or off
Link incrementally: on or off
Use program database: yes (obviously, I need this!)

DebugName.cpp
-------------
#include "stdafx.h"

struct DummyData
{
explicit
DummyData(int x = 7) :
m_x(x)
{}

int m_x;
};

template
class TClassUnsigned
{
public:
enum { theTemplateNumber = N };

TClassUnsigned() :
m_tmpVal(theTemplateNumber*3)
{}

unsigned getTheTemplateNumber() const {
return theTemplateNumber;
}

unsigned m_tmpVal;
};

template
class TClassClass
{
public:
T getTheTemplateTmpVal() const {
return m_tmpVal;
}

T m_tmpVal;
};

int main(int argc, char* argv[])
{
TClassUnsigned<9> tA9;
TClassClass tADummyData;

unsigned res1 = tA9.getTheTemplateNumber();
DummyData res4 = tADummyData.getTheTemplateTmpVal();

return 0;
}

Notes:
- using "Line numbers only" debug informations produce correct symbol names but, then, you have no function/class member informations
- having template code in a separate file has no influence (and, well, this ain't a surprise with the template compiling strategy used by icl or vc)
- separating types information or not among files has no effect
- strange enough, debug symbol for ctor of TClassClass is well-formed while (so I thought that the problem was only relevant to templates with numeric arguments) but the call to getTheTemplateTmpVal() is not

I've tried all settings combination for compiling and linking and still have problems. Did anyone come across this problem and how was it solved (if ever)?

1 envío / 0 nuevos
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.