Packaging PDBs into distributions

For debugging purposes, it is extremely convenient to have the PDBs be residing next to the executables. Is there a reason that we currently have no way to package the PDBs from a build of the toolchain distribution into the installation? Is there a recommended way to address this using something other scheme? It seems a bit unfortunate to have to glob the PDBs from the build directory when the install-distribution or install-distribution-stripped targets could stage the PDBs for the installed components only.

Probably just nobody thought of it. I’m guessing most people debug in the build directory.

(In Chromium’s toolchain packaging, we do upload the PDBs to our symbol server (https://source.chromium.org/chromium/chromium/src/+/main:tools/clang/scripts/package.py;l=127) but we don’t use the “install” build targets, we just build and then pick the files we need.)

Having debug symbols in release can be helpful. Today if such a build crashes if gives a call stack of just addresses, so it’s hard to guess what caused it when you want to work around it. The symbols from production are not even stored, so you can’t add them later.

My understanding is that the RC build does have this debug information and asserts, though it is bigger.

As user, I would be in favor of having the PDBs, even if they are separately downloadable.

Interesting, I’m using the distributions mechanism to control which tools are distributed, which makes this a bit more awkward as a pattern will either gather more than necessary or I need to duplicate the mirroring.

A test run indicates that we generate ~20G of PDBs for ~3G of toolchain binaries, so that ratio makes accidental PDBs being captured and stored a bit less palatable.

Yes, this is the ideal scenario - a symbol server is nicer in that it keeps the distribution size the same but allows debugging, but I can see the value in packaging the PDBs as well. I’m still trying to think through how to best accomplish this.