INFO: WinNT Drivers Built With VC++ 5.0 Require Updated WinDbg

Last reviewed: March 3, 1998
Article ID: Q165969
The information in this article applies to:
  • Microsoft Win32 Device Development Kit (DDK) for Windows NT, versions 3.5, 3.51, 4.0

SUMMARY

If you use Microsoft Visual C++ version 5.0 to build Windows NT kernel mode drivers, then you need to use an updated debugger (WinDbg) to source level debug. The Windows NT debugger (WinDbg version 4.0 or earlier) cannot process the debug information generated from the Visual C++ 5.0 compiler.

We have posted an updated version of WinDbg to the SDK Web site at:

   http://www.microsoft.com/msdownload/platformsdk/Sdktools.htm

This version supports Visual C++ 5.0 symbols.

As more information becomes available, it will be posted here.

MORE INFORMATION

The following procedure explains how to use WinDbg to assembly-level debug Windows NT device drivers created with Visual C++ 5.0. For general details on how to build Windows NT device drivers, see the Online Windows NT DDK documentation. The Visual C debugger is not used to debug kernel-mode drivers.

In the Checked Build Environment shell, use the SET command to change the following system environment variable:

   NTDEBUGTYPE=coff

By changing this system variable, you allow COFF symbolic information to be generated rather than the default CodeView symbolic information. If you do not change the environment variable and you use WinDbg to debug the device driver, messages similar to the following appear when the driver symbols are loaded by the debugger:

   Module Load: LDUNLD.SYS  (symbol loading deferred)
   Module Load: c:\debug\ldunld.sys  (symbol format not supported)
Keywords          : NTDDKDebug NTDDKKMode kbprg
Version           : 3.5 3.51 4.0
Platform          : NT WINDOWS
Issue type        : kbinfo


================================================================================


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: March 3, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.