Search code examples
windbgdebug-symbolspdb-files

PDB symbol server on Linux


How can I set up a symbol server for use with WinDbg and friends on a Linux machine that runs an HTTP server?

The upstream symbol servers provided by Microsoft are HTTP servers (e.g. http://msdl.microsoft.com/download/symbols) and I'd like to mimic their behavior and enable the usual Win32 debuggers to download the symbols from my own.

How can I achieve this without emulating bits and pieces of Windows (e.g. via Wine or KVM)?


Solution

  • You can use the python symstore package to publish PDB (and exe/dll) files to a local symstore directory, and then you just need serve that directory with a web server.

    • configure a web-server to server contests of a directory, say /var/www/symbols
    • install the 'symstore' python package

    Each time you need to publish new PDB/exe/dll files, put them somewhere on you web-server. Then run 'symstore' command, provided by the python package, e.g.

    symstore /var/www/symbols pdb1 pdb2 ...

    This will copy all the specified files to correct subdirectories of /var/www/symbols and create a transaction entry in meta-files of the symbol store.

    The symstore package also provides an python API, so it's possible to do the publication programmatically from any python process.

    Symstore package installation instructions are here: https://pypi.org/project/symstore/