首页 > 代码库 > dump file and pdb file

dump file and pdb file

pdb file:

只是一个映射表,不包含源码内容。

存储的内容:

   1.maps the identifiers that you create in source files for classes, methods, and other code to the identifiers that are used in the compiled executables of your project.

    The .pdb file also maps the statements in the source code to the execution instructions in the executables. 

  The debugger uses this information to determine two key pieces of information:

    the source file and line number that are displayed in the Visual Studio IDE

    the location in the executable to stop at when you set a breakpoint. 

   标识符的映射,代码的映射。

 

   2.A symbol file also contains the original location of the source files, and optionally, the location of a source server where the source files can be retrieved from.

  pdb同样存储着编译时源代码的原始路径。

 

Using Dump Files:

  .dmp:

  1.存储的内容:

      Dump files with heaps:

       If you load a dump file that was saved with a heap, Visual Studio can load the symbols even if the application binary is not found. Visual Studio also saves the binaries of loaded native modules in the dump file, which can make debugging much easier.

      存储了二进制文件,所以缺了调试机器没有二进制文件也可以调试。

    Dump files without heaps: 

      are much smaller than dumps with heap information.

      要调试一定要指定二进制文件。

 

  2.调试要的文件:

    二进制,源,pdb,缺一不可。如果是heap,二进制存在dump文件里,所以不需要自己准备。

 

  3.调试的时候,vs debugger从哪里找文件

  Default search paths for executable files

  Visual Studio automatically searches these locations for executable files that aren’t included in the dump file:

  1. The directory that contains the dump file.(dump文件所在的路径)

  2. The path of the module that is specified in the dump file. This is the module path on the machine where the dump was collected.(如果是dump的机器,dump文件会存着路径)

  3. The symbol paths specified in the DebuggingOptionsSymbols page of the Visual Studio ToolsOptions dialog box. You can add more locations to search on this page.(debugger里指定的pdb的路径)。

 

dump file and pdb file