Howto: Verify Symbols with symchk

Prior to taking a dump on a program, you should be sure that there are matching symbols for the applicaiton the dump is
being taken on.  Large dumps can take many hours to upload to a person for debugging.  You can validate symbols against
the executable before a dump is taken in order to prevent the wrong symbols or a dump with no matching symbols from being sent.
Symchk can be used to verify that the symbols (.pdb) for the program can be found in the path designated after the “/s”
parameter. It will show a failed condition and say that the matching .pdb file could not be found if it’s not
in the folder designated. “symchk” is part of the Debugging SDK. 
  You can verify symbols by using symchk from a cmd window in the debug folder. 
  If the .pdb file is not found, then symchk will complain. 
          Example: C:\debug>symchk D:\DebugThis\myProgramOrDll.exe /s D:\DebugThis\Debug

     If you want a lot of details:

          Example: C:\debug>symchk  /v D:\DebugThis\myProgramOrDll.exe /s D:\DebugThis\Debug

NOte:  Of course, you’ll want to be sure that the executable (.DLL,.EXE, etc) was not stripped by email antivirus
on the sending or recieving end.  Thats why it’s often good to put code and executables in a password-protected zip file
when such content is going to be emailed. 

Once the symbols and dump are recieved by the person who will be debugging, they can use the commands below to check for the
symbols being loaded in a debugger such as Windbg after the symbol path is set:

    !sym noisy       Noisy output while reloading symbols           
    .reload -f       Force reloading of symbols
    lm               List modules

Comments (0)

Skip to main content