Add Debug Interface Access (DIA) SDK COM wrappers and tests - #7
Merged
Conversation
Adds struct-based COM wrappers for the DIA SDK interfaces in the new Microsoft.VisualStudio.Debugging.DebugInterfaceAccess namespace, following the same pattern as the existing VS Setup interfaces (IComIID structs with a nested [ComImport] Interface, dual NETFRAMEWORK/static IID, and delegate* vtable calls). All 54 dia2 interfaces are covered, with vtable indices verified against dia2.h. - Documentation is sourced from the DIA headers: IDL helpstrings drive member summaries, SAL annotations drive parameter docs, and csymrow.h field comments enrich the IDiaSymbol boolean flags. - IEnumUnknown, PROPSPEC, and IEnumSTATPROPSTG are generated via CsWin32 (NativeMethods.txt) and aggregated onto Madowaku; net472 IComIID polyfills are added for the generated COM structs. - Adds a CLASSID class with the DiaSource, DiaSourceAlt, and DiaStackWalker CLSIDs. - Tests load the architecture-appropriate msdia140.dll from the Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles package via Madowaku's ComClassFactory and exercise the load/session/symbol pipeline.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds struct-based COM wrappers for the Debug Interface Access (DIA) SDK in the new
Microsoft.VisualStudio.Debugging.DebugInterfaceAccessnamespace, following the same pattern as the existing VS Setup interfaces: anIComIIDstruct with a nested[ComImport] Interface, a dualNETFRAMEWORK/static IID implementation, anddelegate* unmanaged[Stdcall]vtable calls.All 54 interfaces from
dia2are covered, plus the supporting enums (SymTagEnum,MemoryTypeEnum,CV_CPU_TYPE_e) and structs (DiaAddressMapEntry,DiaTagValue). Vtable indices were verified againstdia2.hfor every interface.Details
[in]/[out, retval]/[size_is]) india2.h, and theIDiaSymbolboolean flags are enriched from thecsymrow.hfield comments in the DIA implementation sources.IEnumUnknown,PROPSPEC, andIEnumSTATPROPSTG(the types not shipped by Madowaku) are generated through CsWin32 (NativeMethods.txt) and aggregate onto Madowaku's existingWindows.Win32types. Per-structIComIIDpolyfills are added undervsinterop/Windows/...for thenet472path, where CsWin32 does not emit the static-abstract IID.CLASSIDclass with theDiaSource,DiaSourceAlt, andDiaStackWalkerCLSIDs (verified fromdia2.h).msdia140.dllbinaries, copy the architecture-specific binaries next to the test assembly, and load the correct one directly via Madowaku'sComClassFactory. The tests exercise the full create →loadDataFromPdb→openSession→ global scope / compiland / table pipeline against the test assembly's own PDB.Validation
net10.0-windows,net10.0, andnet472.net10.0-windowsandnet472.