Q259924: INFO: COFF Type Debug Information No Longer Contains Line Number

Article: Q259924
Product(s): Microsoft C Compiler
Version(s): 6.0
Operating System(s): 
Keyword(s): kbDebug kbLinker kbVC kbVC600 kbDevStudio kbDSupport kbGrpDSTools
Last Modified: 02-MAY-2002

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual C++, 32-bit Enterprise Edition, version 6.0 
- Microsoft Visual C++, 32-bit Professional Edition, version 6.0 
- Microsoft Visual C++, 32-bit Learning Edition, version 6.0 
- Microsoft Visual C++.NET (2002) 
-------------------------------------------------------------------------------

SUMMARY
=======

The Common Object File Format (COFF) type debug information that is generated by
using Visual C++ version 6.0 does not contain line-number information. COFF type
debug information in earlier versions of Visual C++, such as Visual C++ version
5.0, does contain line-number information.

MORE INFORMATION
================

The Visual C++ 6.0 compiler generates the line-number information and places
this information in the .obj files. However, the linker strips the line numbers
before producing the final binary image (.exe, .dll, .ocx, and so on). This is
by design.

You can use the Dumpbin.exe utility that is shipped with Visual C++ to find out
whether line numbers were stripped. Open an MS-DOS command prompt and type the
following:

  "dumpbin.exe /HEADERS myexe.exe | more" (without the quotation marks)

In the "FILE HEADER VALUES" section you will see "Line numbers stripped"; you
won't see this line when you view the header values of the corresponding .obj
file.

REFERENCES
==========

For more information about the COFF specification, see the Microsoft Portable
Executable and Common Object File Format Specification topic on the following
Microsoft Developer Network (MSDN) Library Web site:

  http://msdn.microsoft.com/library/default.asp?URL=/library/specs/msdn_pecoff.htm

Additional query words:

======================================================================
Keywords          : kbDebug kbLinker kbVC kbVC600 kbDevStudio kbDSupport kbGrpDSTools 
Technology        : kbVCsearch kbAudDeveloper kbVC600 kbVC32bitSearch kbVCNET
Version           : :6.0
Issue type        : kbinfo

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