Microsoft Visual Studio PDB file related matters

Source: Internet
Author: User

Microsoft Visual Studio PDB: Debug symbol files, program database (PDB) files save debugging and project state information, which can be used to debug the program configuration;

A PDB file is created when you build with/zi or/zi (for C + +).

In Visual C + +, the/fd option is used to name the PDB file created by the compiler.

When you use the wizard to create a project in Visual Studio, the/FD option is set to create a named project. PDB for PDB.

If you use a build file to create a C + + application and specify/ZI or/zi without specifying/FD, two PDB files will eventually be generated: *vc80. The PDB, more generally, is vcx0.pdb, where x represents the version of Visual C + +. )

This file stores all debugging information for each OBJ file and resides in the same directory as the project build file. *project. PDB This file stores all debugging information for the. exe file.

It resides in the \debug subdirectory for C + +. Each time you create an OBJ file, theC + + compiler merges debugging information into vcx0.pdb. The information that is inserted includes type information, but does not include symbolic information such as function definitions. Therefore, even though each source file contains a common header file (such as <windows.h>), the typedef in those header files is stored only once, not in every OBJ file. The linker creates project. PDB, which contains debugging information for the project's EXE file. Project. The PDB file contains complete debugging information (including function prototypes), not just type information found in vcx0.pdb. Both of these two PDB files allow incremental updates. The linker also embeds the path to the. pdb file in the. exe or. dll file that it creates.

The Visual Studio Debugger uses the PDB path in an EXE or DLL file to find project. PDB file.

If the debugger cannot find the PDB file at that location, or if the path is not valid (for example, if the project is moved to another computer), the debugger searches for the path that contains the EXE, which is the symbol path specified in the Options dialog box (debug folder, symbols node).

The debugger does not load the PDB that does not match the binary being debugged.

Microsoft Visual Studio PDB file related matters

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.