BUG: Watch on Struct Member Gives CXX0030 if Offset >= 32K

Last reviewed: July 22, 1997
Article ID: Q117150
1.00 1.50 WINDOWS kbtool kbbuglist

The information in this article applies to:

  • The Visual Workbench Integrated Debugger included with: Microsoft Visual C++ for Windows, versions 1.0 and 1.5

SYMPTOMS

If a C++ application has a global structure containing member arrays whose total size exceeds 32K, expanding a member of the structure in the watch window will cause a CXX0030 error message, "expression not evaluatable", to display if the starting address of the member is over 0x7FFF from the beginning of the structure. This happens both in CodeView for Windows and the Visual Workbench integrated debugger.

CodeView for MS-DOS behaves a little differently; while the structure member can be expanded, the values displayed are incorrect.

NOTE: This problem does not occur for C applications.

STATUS

Microsoft has confirmed this to be a bug with Visual C++ for Windows, versions 1.0 and 1.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

This is not a problem in Visual C++ 32-bit Edition, version 1.0.

MORE INFORMATION

Go through the following steps to reproduce the problem, using the sample code below:

  1. Build a debug version of the program.

  2. Run it past the initialization of the structure "teststruct".

  3. Add a watch on teststruct.

  4. Expand teststruct and then "teststruct.c".

Sample Code

/* Compile options needed: /Zi /Od /Tp
*/

   struct test
   {
       char a[16384];
       char b[16384];     // If changed to b[16383],
       char c[10000];     // expanding c works correctly.
   } teststruct;

   void main( void )
   {
       teststruct.c[0] = 'A';
   }      // Break here, set a watch on teststruct, expand c.


Additional reference words: 1.00 1.50 4.00 4.01 4.10
KBCategory: kbtool kbbuglist
KBSubcategory: WBDebug
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.