Introduction
This article helps developer who are beginner or intermediate level but don't have much understanding about the importance of PDBs and why they are required.
What is PDB :
PDB is acronymn for Program database file
A PDB file is typically created from source files during compilation. It stores a list of all symbols in a module with their addresses and possibly the name of the file and the line on which the symbol was declared. (from wiki)
Why PDB as a seperate file?
These symbols can be very well embedded in the binary but it will result in the file size growing significantly larger (sometimes by several megabytes). To avoid this extra size, modern compilers and early mainframe debugging systems output the symbolic information into a separate file; for Microsoft compilers, this file is called a PDB file
What PDB file Contains:
Following are some of the important information stored by PDB file
1. Local variable name- To prove this just open your dll with Reflector and uncheck the "Show PDB Symbols" option as shown in below screenshot you will find your local variables are replaced with names like "str" for string variable and "num" for decimal etc. But when you decompile your binary with the option checked Reflector uses the PDB file and shows actual variable name in decompiled code.
Read more: Codeproject
QR: