PRB: Debugger Displays Incorrect Information for VariableLast reviewed: July 24, 1997Article ID: Q168080 |
The information in this article applies to:
SYMPTOMSWhen you debug an optimized build of an application that includes debug information, the debugger may display incorrect symbol data.
RESOLUTIONYou can work around this problem by displaying the desired variable in a dialog box or printing it out using cout or printf();
MORE INFORMATIONThe debugger displays incorrect symbol data when debugging an application built with the following compiler options:
Steps to Reproduce Behavior
Program Database in the Debug Info list box.4. In the Project Settings dialog box, click the Linker tab and select the "Generate debug info" check box.5. Set a breakpoint in Something(). 6. Press the F5 key to build and debug the application.
//Compiler options needed: /GX /Oy /Og /MLd #include <windows.h> #include <iostream> void Something(DWORD dwFirst, DWORD dwSecond) { // cout will display the correct information. std::cout << "dwFirst = " << dwFirst << ", dwSecond = " << dwSecond << std::endl; } int main() { DWORD dwFirst = 123456; DWORD dwSecond = 234567; Something(dwFirst, dwSecond); return 0 ; } |
Keywords : WBDebug
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |