Today’s article will be pretty short. It is regarding symchk.exe. For those of you who do not know what symchk is, it is a program that allows you to download symbols (.pdb file extension). It will contain all the function and data type of the program created when compiling on Microsoft Visual Studio.
To obtain symchk.exe, download any windbg version and symchk.exe will be inside it. You can download them here. Altneratively, if you prefer the older version of windbg, you can download them here. (Note: The link to the older version is not official hence you can download them at your own risk. I tried it before and it works. However, to be safe, only install them in a virtual machine.)
Once you have it, you can easily download any symbol as long as you have the URL to the server that contains all the symbols for that program.
For example you would like to install symbol, you can do so by executing this:
C:\> symchk.exe /r <Location of folder or file to get their symbols> /s SRV*<Location to download symbols to>*<Location of symbol server>
Example of downloading Firefox symbols:
C:\> symchk.exe /r "C:\Program Files\Mozilla Firefox" /s SRV*"C:\symbols"*"https://symbols.mozilla.org/"
Example of downloading a specific file’s symbol from Microsoft:
C:\> symchk.exe %systemroot%\system32\drivers\WdFilter.sys /s SRV*"C:\symbols"*"https://msdl.microsoft.com/download/symbols"
/r – Recursion. Get symbol of all the content in the folder as well as nested folders’ content. You can point it directly to a file and it still work. Example: “C:\Program Files\Mozilla Firefox\xul.dll“.
/s – Path to download symbol to as well as location of symbol server.
To see other flags usage, you can just input symchk.exe to the console/terminal. It will show you a list of usage.
Some debugging tips:
- If you can’t run symchk.exe, make sure you navigate to the right folder to run symchk. Alternatively, you can add it to the Environment Variable.
- If download does not get the designated location or download fail, make sure you add “” for your file path.
Feel free to comment if you like me to add anything or any correct I need to make. Thank you!
You may also send me some tips if you like my work and want to see more of such content. Funds will mostly be used for my boba milk tea addiction. The link is here. š