Windows Symbol Files
1. What is Symbol File?
Symbol files hold a variety of data which are not actually needed when running the binaries (Dll, EXE ...), but which could be very useful in the debugging process (It's a good partner for VC6 and WinDbg). In layman's terms, Symbol file is a file containing associated binaries (Exe, DLL) debugging information, which is a .pdb as an extension, such as a GDI32.dll under WinXP, then Microsoft generates a GDI32 when compiling the DLL. PDB file, the programmer has this PDB file, you can use it to debug, track the inside of GDi32.dll! The file and binary compiling version are closely related, such as you modify the DLL output function, etc. Compiling the DLL, then the original PDB file is outdated, can no longer qualify for the burden of debugging, this time you need to modify the PDB file. Everyone will find the PDB file when using VC6. It will be found in Debug / Release directory (for how to generate a release version of PDB 4. How do I build a PDB file that generates the Release version of the binary file in VC6 ?).
Typically, Symbol Files Might Contain: 1. Global Variables 2. Local Variables 3. Function Names and The Addresses of Their Entry Points 4.FPO Data (Frame Pointer Omius] ), Frame Pointer is a row sequence number for finding a data structural source code that will be called in the call stack. Source-line number
2. How to get Symbol Files?
To install Symbol Files, please make sure your OS version will go to Microsoft's website to download the corresponding Symbol Files installation. There is no special requirement, just need to install it into a directory, then set this in Windows environment variables. PATH (can also be set in VC6, Windbg, so only VC6 or Windbg you can see ...) then Windbg, NTSD,
Debugging software such as Drwatson can be found. Install Symbol Files is a principle, please pay attention:
"If you plan to install symbols manually, it is crucial", "IT IS CRUCIAL That you Remember this Basic Rule: The Symbol Files on The Host Computer Are Required To Match The Version of Windows Installed On The Target Computer
Host Computer The Host Computer Is The Machine That Runs The Debugging Session. in a Typical Two-System Debugging Session, The Host Can Be Any Computer Which Can Be Connected To The Target Computer
target computer The target computer is the machine that has experienced the failure of a software component, system service, an application, or of the operating system. This is the computer that needs to be debugged and is the focus of the debugging session. This can Be a computer located WION A FEET of The Computer on Which You Run The Debugging Session, or it can be in a completeding. Sometimes Referred To as the debuggee3. How to integrate Symbol Files in VC6 ??
1.Open Your Workspace In VC6 ; 2.open the Options Dialog Box (Tools-> Options); 3. Click The Directoties Tab; 4.Click Executable Files from The show directories for Drop-down list; 5.add the path of Symbol-files to path-list; 6.click ok to finish.
4. How do I build a PDB file that generates the Release version of the binary file in VC6 ?
This is Microsoft method. In actual combat, in order to make our code by others Copy to other places, you can also compile I usually use #pragma to help me generate the files I need:
5.Free Build (Retail Build) And Checked Build (Debug Build)
Two different builds of each NT-based operating system exist: The free build (or retail build) of Windows is the end-user version of the operating system The system and drivers are built with full optimization, debugging asserts are disabled, and debugging. information is stripped from the binaries. A free system and driver are smaller and faster, and it uses less memory. The checked build (or debug build) of Windows serves as a testing and debugging aid in the developing of the operating system and kernel- mode drivers. The checked build contains extra error checking, argument verification, and debugging information that is not available in the free build. A checked system or driver can help isolate and track down driver problems that can cause unpredictable behavior, result in memory leaks, Or Result In Improper Device Configuration. Although The Checked Build Provides Extra Protection, IT Consumes More Memory and Disk Space Than The Free Build. System and Driver Performance IS slower for the following reasons:. The executables contain symbolic debugging information Additional code paths are executed due to parameter checking and output of diagnostic messages for debugging purposes.6 how to update Symbols.
If you use Windbg to find a symbol file (PDB), how important these files are related to local OS, such as your WinXP, however, may have a non-match. What should I do? Update online! Please enter the following line inside your Windbg Symbols Path:
SRV * D: / Symbols / Websymbols * http://msdl.microsoft.com/download/symbols
(Red part Write on your local path you want to save)
If you are not online, after you open a debugger with Windbg, enter Symchk Enter, Windbg will automatically connect to Microsoft's website to update new PDB files according to your machine, save it on top of red In the partial local path, you can make sure your symbol file version is consistent with the version of the files on your machine (I refer to system files: DLL, sys ...).
If you are online, then you need to configure:
Note: http://home.lenovo/proxy.pac is the agent configured script address I assume; 10.99.20.26: 8080 is the proxy server address and port I assume, please set it according to your own situation.
1. Configure IE;
2. Set an environment variable;
This environment variable is: _nt_symbol_path; you can fill in it like this.
3. Tell Windbg: You can go to Microsoft website to download the PDB file.
Any questions are welcome to communicate: yangminga@lenovo.com or perdubug@hotmail.com