BUG: Debugger Shows Incorrect "this" Pointer (143109)
The information in this article applies to:
- 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 Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q143109 SYMPTOMS In Visual C++ 4.0, when you debug a class that uses
multiple inheritance, the "this" pointer for any of the base classes that
reside at an offset in the class are displayed incorrectly. Data for derived
classes is not displayed correctly either because the debugger attempts to
reference the data by using the invalid "this" pointer.
In Visual
C++ 4.1 or 4.2, only the value of "this" pointer is not shown correctly. All
the members are displayed correctly. CAUSE The compiler produces incorrect debugging information
causing a display error in the debugger only. The vtable entries themselves are
correct, and programmatic access to the data produces the proper values.
RESOLUTION The only way to work around this problem is to output the
addresses to an output device. You may use a TRACE statement or cout() as shown
in the sample code below. STATUS Microsoft has confirmed this to be a bug in the Microsoft
products listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 7/5/2005 |
---|
Keywords: | kbBug kbCompiler kbDebug kbide KB143109 |
---|
|