This is an archive of the discontinued LLVM Phabricator instance.

[DIA] Add support for dumping injected sources
ClosedPublic

Authored by zturner on Mar 12 2018, 5:05 PM.

Details

Summary

Injected sources are basically a way to add actual source file content to your PDB. Presumably you could use this for shipping your source code with your debug information, but in practice I can only find this being used for embedding natvis files inside of PDBs.

In order to effectively test LLVM's natvis file injection, we need a way to dump the injected sources of a PDB in a way that is authoritative (i.e. based on Microsoft's understanding of the PDB format, and not LLVM's). To this end, I've added support for dumping injected sources via DIA. I made a PDB file that used the /natvis option to generate a test case.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.Mar 12 2018, 5:05 PM
asmith accepted this revision.Mar 12 2018, 7:25 PM

One small change would be to add the name of the guards as comments to the #endifs

i.e. #endif // LLVM_DEBUGINFO_PDB_PDBEXTRAS_H

Otherwise LGTM.

This revision is now accepted and ready to land.Mar 12 2018, 7:25 PM
This revision was automatically updated to reflect the committed changes.