Skip to content

[release/10.0] Fix IsPortableCodeView when rewriting assembly. - #693

Merged
akoeplinger merged 1 commit into
release/10.0from
lateralusX/fix-is-portable-code-view-10.0
Aug 4, 2026
Merged

akoeplinger merged 1 commit into
release/10.0from
lateralusX/fix-is-portable-code-view-10.0

Conversation

@lateralusX

@lateralusX lateralusX commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Current rewrite of the debug directory didn't copy over the Minor/MajorVersion, making portable PDBs not work as intended (IsPortableCodeView returned false). It also reset the timestamp, incorrect in the portable PDB scenario as well, since that field is not a real timestamp but the low 4 bytes of the PDB content id (part of the PDB identity).

Fix makes sure to copy Minor/MajorVersion from old, as well as the timestamp when dealing with portable PDBs. For full PDBs all works as before: Minor/MajorVersion will be 0 and the timestamp is regenerated.

Backport of #688

Current rewrite of the debug directory didn't copy over the
Minor/MajorVersion, making portable PDBs not work as intended
(IsPortableCodeView returned false). It also reset the timestamp,
incorrect in the portable PDB scenario as well, since that field is
not a real timestamp but the low 4 bytes of the PDB content id (part
of the PDB identity).

Fix makes sure to copy Minor/MajorVersion from old, as well as the
timestamp when dealing with portable PDBs. For full PDBs all works as
before: Minor/MajorVersion will be 0 and the timestamp is regenerated.

Towards dotnet/runtime#118700
@lateralusX
lateralusX requested a review from akoeplinger August 4, 2026 08:52
@akoeplinger akoeplinger changed the title Fix IsPortableCodeView when rewriting assembly. [release/10.0] Fix IsPortableCodeView when rewriting assembly. Aug 4, 2026
@akoeplinger
akoeplinger enabled auto-merge (squash) August 4, 2026 08:56
@akoeplinger
akoeplinger merged commit 9269cde into release/10.0 Aug 4, 2026
6 checks passed
@akoeplinger
akoeplinger deleted the lateralusX/fix-is-portable-code-view-10.0 branch September 4, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants