Debugging information

First, what is the debugging information

Symbol debug information that is used to help with analysis of the debugger to debug the layout of the debugger, the debugger so debug information can help positioning variables, function address, the display value of a variable (including complex structures and structures, etc.), and address can map to a line of source code.

Second, the debugging information classification

  • Disclosed functions and variables
    described in the variable cross-compile any visible function unit, which stores schedule information and location names
  • Private functions and variables
    describe all functions and variables, including functions and variables across compilation units is not visible, such as static functions and variables, parameters, debugging information store its location, size and name
  • Source file and line number of
    the source line to a program corresponding mapping. It does not include comments
  • Type information
    Additional information debugging information storage type, so that the debugger can distinguish variables, parameters and return values are type int / char or user-defined types. For functions, the debugger also know the number of parameters, calling convention etc.
  • FPO information
    compile time if you use the FPO optimization, debug information for the debugger to know the function call stack size.
  • Edit and Continue information
    is mainly used for VS implement and continue editing functions

Third, the store debugging information

Debugging information when compiling connected generation, debugging, this action must be compiled after the connection, you need to store this information together, leaving the development environment for debugging can, of course, be in the form of a file to permanent storage. From Microsoft's development history, there are three formats for storing debugging information:

  • COFF format
    contains only three kinds of debug information types: is disclosed functions and variables, the source line information, FPO information. Stored directly in the executable file.
  • CodeView format
    contains all the editing and debugging information except to continue information may be stored in an executable file, it can be stored in files * .DBG
  • PDB format
    can store all types of debugging information is stored only in * .PDB file

* .DBG and * .PDB file is what we usually say that the symbol file.

 

Guess you like

Origin www.cnblogs.com/yilang/p/11201167.html