Cannot set breakpoint. Decorated name length exceeded?

C

Chris Stankevitz

Hi all,

I once had a function in which I could not set a breakpoint. VS VC++ .net
2003 7.1 (native c++) would crash. This particular function had about five
arguments. Each argument was an STL container of some sort. The "expanded"
name of the function (with all templates written out) was extrememly large
and I believe this was the cause of the crash. I worked around the problem
by creating a "dummy" struct to hold the five arguments.

I previously thought these warnings could be ignored:

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(152) :
warning C4503: 'std::allocator<_Ty>::rebind<_Other>' : decorated name length
exceeded, name was truncated

However, my experience with this crash is leading me to rethink this
approach.

What should I do about C4503? The GCC build of my project has a "no
warnings tolerated" policy, but the MSVC 7.1 .net 2003 build has the
"luxury" of C4503 warnings. Can I safely ignore them?

Thanks for your input,


Chris
 
W

William DePalo [MVP VC++]

Chris Stankevitz said:
I once had a function in which I could not set a breakpoint. VS VC++ .net
2003 7.1 (native c++) would crash. This particular function had about
five
arguments. Each argument was an STL container of some sort. The
"expanded"
name of the function (with all templates written out) was extrememly large
and I believe this was the cause of the crash. I worked around the
problem
by creating a "dummy" struct to hold the five arguments.

I previously thought these warnings could be ignored:

C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\vector(152)
:
warning C4503: 'std::allocator<_Ty>::rebind<_Other>' : decorated name
length
exceeded, name was truncated

However, my experience with this crash is leading me to rethink this
approach.

What should I do about C4503? The GCC build of my project has a "no
warnings tolerated" policy, but the MSVC 7.1 .net 2003 build has the
"luxury" of C4503 warnings. Can I safely ignore them?

At this link

http://msdn2.microsoft.com/library/074af4b6.aspx

there is this:

<quote>
The correctness of the program, however, is unaffected by the truncated name
</quote>

so unless we get contrary information from a higher power here, I'd ignore
it. :)

And by the way, if you need a breakpoint and don't mind an extra
edit/compile/link cycle just add a call to DebugBreak() where you need it.

Regards,
Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top