[Proposal] Expose the Debug Interface Access API
DaZombieKiller opened this issue · comments
Description
https://docs.microsoft.com/en-us/visualstudio/debugger/debug-interface-access/debug-interface-access-sdk
This is a set of COM APIs covering the parsing of PDB files. The headers are typically located in %VSInstallDir%\DIA SDK\include
(when the C/C++ tools are installed). It may also be worthwhile to expose the DbgHelp
APIs, which are higher level wrappers over DIA.
Rationale
I make use of DIA in several projects I'm working on with C# where performance is a significant factor, thus it would be immensely helpful for the APIs to be available in low-level blittable form via TerraFX.
Drawbacks
The msdia*.dll
(and dbghelp.dll
) libraries are not typically available from PATH
, and are usually only present when Visual Studio has been installed with the C/C++ tools workload. This could complicate general usage (though I suppose it could be mitigated with a NuGet package providing the DLLs?), since you would likely need to register a custom resolver for the APIs to work.
Alternatives
Currently you can generate a (non-blittable) binding for DIA by using midl
and tlbimp
, but several of the APIs end up being unwieldy (or potentially unusable) due to the resulting signatures using managed arrays, refs, etc.