3 ms·
Well, PDB isn't DWARF (which is kept inside the executable) so indeed maybe you can't find the PDB from the executable... you could embed its path using a .ver
by yosefk 3y ago
Well, PDB isn't DWARF (which is kept inside the executable) so indeed maybe you can't find the PDB from the executable... you could embed its path using a .ver section as described in TFA though (if it's not already there - I never worked seriously enough on Windows to learn). As to finding the sources from the PDB - yes it's easier after the monkey patching if the source is exported on NAS or is kept locally; if you download from CI then CI can put a canonical local directory in the path, convenient for concurrently debugging multiple released versions.
Regarding debugger path remapping - there are a lot of tools consuming debug info, not just "the" debugger, and not all have the setting; assert line info printout doesn't have a setting like that. It's also extra hassle to remap even if you can.
As to storing the sources in the binary - it can be nice but it's going to be slower for various reasons. How big they are depends in part on how good you are at putting just the code you actually compiled there which is not always easy. And when assert fails you need to extract it before looking at it; everything now has this step.
The point of refix is to make sources easier / trivial to find with very minor build flow changes - just a compiler flag and a tens of ms long post build step.
- Joker_vD 3y agoOh, you have your CI store all the sources for all the builds, and you have NFS-like access to it? Yeah, OK, this case I can see how having absolute paths would be useful. In my case at work (and we actually use Linux), we sadly don't have that luxury: the CI is walled of and its disk is purged every midnight, so knowing what folder the project was built in is pointless since it doesn't even contains the commit hash, it has the CI's unique job number instead but even it is also useless since the CI for some reason stores info only about 3 days of build jobs so... yeah. We resort to baking in the git info as a recognizable string into the binary, and then checking out the sources manually. P.S. IIRC, PDB's are matched to the EXE's by the EXE's checksum so generally if the PDB is checked in into a symbol server, then retrieving it back is simple, if you know what source server to query, of course.