Skip to content

Write Portable PDB local signature row id - #588

Open
dajiaohuang wants to merge 1 commit into
0xd4d:masterfrom
dajiaohuang:fix-portable-pdb-localsig-rid
Open

dajiaohuang wants to merge 1 commit into
0xd4d:masterfrom
dajiaohuang:fix-portable-pdb-localsig-rid

Conversation

@dajiaohuang

Copy link
Copy Markdown

Fixes #583.\n\nPortable PDB sequence-points blobs require the StandAloneSig row id in the LocalSignature header. MethodBodyWriter retains the metadata token for PE and Windows PDB use; convert it to an RID only at the portable PDB write site.\n\nValidated with a benign locally compiled Debug assembly containing a local variable and sequence point: the current code emitted the token and System.Reflection.Metadata failed to resolve it (BadImageFormatException); this change emitted RID 1 and resolved a 4-byte signature. The library and synthetic runner built successfully on .NET 6 / .NET 9 SDK/runtime. No Windows PDB test was run.

@pcshrosbree

Copy link
Copy Markdown

Thanks for picking this up, @dajiaohuang!

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.

Portable PDB writer stores the StandAloneSig token, not the row id, in the sequence points blob's LocalSignature

2 participants