Limitations on Support for C++
The debugger interprets C++ names and expressions using the ANSI standard
rules. C++ is a distinct language, rather than a superset of C. Where
the semantics of C and C++ differ, the debugger provides the interpretation
appropriate for the language of the program being debugged.
To make the debugger more useful, it relaxes some standard C++ name
visibility rules. For example, you can reference public, protected, and
private class members.
The following limitations apply to debugging a C++ program:
- If a program is not compiled to include debug information,
do not set a breakpoint on an inline member function; it may confuse the
debugger.
- When you use the debugger to display virtual and
inherited class information, the debugger does not support pointers to
members of a class.
- The debugger does not support calling the C++ constructs
new and delete.
As alternatives, use the malloc() and free() routines from C.
- Sometimes the debugger does not see class type names
with internal linkage, and it issues an error message stating that the
name is overloaded.
- You cannot select a version of an overloaded function
that has a type signature containing ellipsis points (...).
- Pointers to functions with type signatures that contain
parameter list or ellipsis arguments are not supported.
- The debugger does not support consideration of namespace
using directives when performing name resolution.
Limitations for debugging templates include the following:
- You cannot specify a template by name in a debugger
command. You must use the name of an instantiation of the template.
- Setting a breakpoint at a line number that is inside
a template function will not necessarily stop at all instantiations of
the function within the given file, but only at a randomly chosen few.