BUG: Incorrect Evaluation of Static Member Functions in Debugger (168380)
The information in this article applies to:
- The Integrated Debugger, when used with:
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q168380 SYMPTOMS
Function evaluation of static member functions cannot be done in the Watch
or the QuickWatch window of the debugger. You a wrong value, or get the following error message:
Error:cannot display value
CAUSE
The expression evaluator in the debugger does not properly distinguish
between static and non-static methods. The first case listed above appears
to be an evaluation of a method without a "this" pointer, hence, we get an
"Error:cannot display value" message. The second case occurs because the
debugger is not properly distinguishing between static and non-static
member functions. The "this" pointer is pushed onto the stack to evaluate
the static member function, which is incorrect.
RESOLUTION
There is no workaround. Do not attempt to evaluate static member functions
from within the debugger, either in the watch or quick watch window.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 12/8/2003 |
---|
Keywords: | kbBug kbDebug kbide KB168380 |
---|
|