The COFF type debug information no longer contains line numbers in Visual C++ (259924)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0
  • Microsoft Visual C++ 2005 Express Edition
  • Microsoft Visual C++ .NET (2003)
  • Microsoft Visual C++ .NET (2002)

This article was previously published under Q259924

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

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:

Modification Type:MajorLast Reviewed:12/30/2005
Keywords:kbDebug kbDevStudio kbinfo KB259924 kbAudDeveloper