By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,473 Members | 3,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,473 IT Pros & Developers. It's quick & easy.

Cannot set breakpoint. Decorated name length exceeded?

P: n/a
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


Dec 22 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Chris Stankevitz" <ch******@stankevitz.nospamplease.com> wrote in message
news:O5**************@TK2MSFTNGP09.phx.gbl...
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
Dec 22 '05 #2

P: n/a

"William DePalo [MVP VC++]" wrote:

http://msdn2.microsoft.com/library/074af4b6.aspx
Thanks for the link! It's unfrotunately that C4503 does indeed affect
debugging (which I have seen in practice and is confirmed at your link).
add a call to DebugBreak()


Which #include has the function "DebugBreak()"?

Thanks,

Chris
Jan 4 '06 #3

P: n/a
"Chris Stankevitz" <ch******@stankevitz.nospamplease.com> wrote in message
news:ue***************@TK2MSFTNGP14.phx.gbl...

"William DePalo [MVP VC++]" wrote:

http://msdn2.microsoft.com/library/074af4b6.aspx
Thanks for the link!


You are welcome.
Which #include has the function "DebugBreak()"?


You should include <windows.h> although it is defined in <winbase.h>

Regards,
Will
Jan 4 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.