Repository navigation
Add Windows PDB metadata preparation and native ISF overlays - #84
Merged
Merged
Conversation
PdbMetadata reads MSF 7 / CodeView V70 and V80 PDB metadata from selected
streams and writes a deterministic ISF 6.2.0 profile offline:
- Identity: GUID, both age fields, original DBI machine; an explicit
targetMachine is required when the DBI machine is zero.
- Types: structs, classes, unions, enums, arrays, bitfields and flat
32/64-bit pointers (legacy records without size bits keep their kind's
width). C++ field lists export instance members and skip methods, bases,
nested types, static members and vtable entries; the declared count is an
upper bound when such elements are present.
- Symbols: public, global and unambiguous file-local addresses after OMAP;
absolute values kept separately; file-local names with several addresses
are omitted with a diagnostic; a PDB without a symbol stream still loads.
- Limits: maxMetadataBytes and per-table maxRecords bound loading;
WriteIsf has its own maxTraversalSteps export limit.
ISF import:
- Accepts format 6.1.0 as well as 6.2.0.
- Members whose physical bits overlap are grouped into a generated union held
by a promoted __overlay_{offset} member, so original paths still resolve and
unrelated members keep struct semantics.
- An explicit pointer storage base supplies the pointer's width and byte
order, so native and WOW64 pointers coexist.
Memory sources:
- MappedMemorySource.Read returns a positive short count at a mapping
boundary (breaking for direct callers; region APIs assemble transfers and
keep confirmed prefixes across missing extents).
- CachedMemorySource stores positive short reads and evicts by retained bytes.
The MemoryProjectionTests pointer case now stores its big-endian pointer in
big-endian order; it previously passed only because pointer byte order was
ignored.
Conflicts: - CHANGELOG.md: both Unreleased sections combined. - contracts/api/managed/manifest.json: main's released history kept (revision 75, the StyleCop StructValue rename); this branch's unreleased revisions 75-77 consolidated into revision 76 for the PdbMetadata surface. StyleCop 1.3 (SA1653): the secondary PdbMetadata partials document themselves with <content>.
CI's coverage gate rated PdbMetadata.Isf.cs high risk (74% lines, 59% branches) and PdbRecordReader.cs critical (66%, 45%): enum export, modifiers, bitfields, function pointers, nested and forward-element arrays, unions, anonymous members, continuations, most numeric-leaf encodings and nearly every rejection path had no test. - RichStorageForms_ExportAndReadBack exports one record using every supported storage form and reads it back through IsfMetadata and MemorySession. - MalformedStorage_RejectsTheExport covers 28 malformed or unsupported descriptions, each of which must fail instead of publishing a layout. - WriteIsf_RejectsUnwritableOutputAndPathNames covers argument validation. Both files now rate low risk (99%/96% and 96%/95%). dotnet format: switch labels in SkipNonStorageField and the OMAP test follow the repository's unindented case style.
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.
Windows PDB metadata preparation, native ISF overlays, and memory-source fixes.
PdbMetadata reads MSF 7 / CodeView V70 and V80 PDB metadata from selected streams and writes a deterministic ISF 6.2.0 profile offline (no debugger, symbol server or network):
targetMachineis required when the DBI machine is zero.Diagnostics; a PDB without a symbol stream still provides its types.maxMetadataBytesand per-tablemaxRecordsbound loading;WriteIsfhas its ownmaxTraversalStepslimit.ISF import
__overlay_{offset}member, so original paths still resolve and unrelated members keep struct semantics.Memory sources
MappedMemorySource.Readreturns a positive short count at a mapping boundary. Region APIs (ReadExactly,ReadPartial) assemble complete transfers; direct callers continue from the returned count.CachedMemorySourcestores positive short reads and evicts by retained bytes.Brought up to date with
mainafter #83 (StyleCop 1.3: secondaryPdbMetadatapartials use<content>). The managed API baseline keeps main's released revision 75 and records this branch's surface as revision 76 (additive;PdbMetadatais new).Local checks on the merged tree: full solution Release build (0 warnings),
test-managed --full(4652 runtime tests on net8.0 and net10.0, parity, compiler, generator), documentation validator, API compare, changed-documentation, mutation remap, Explorer catalog.