-
Notifications
You must be signed in to change notification settings - Fork 608
Add support for new Roslyn CustomDebugInfo #485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
wtfsck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PdbTypeDefinitionDocumentsDebugInfo stores MDTokens of PDB documents. Those tokens won't necessarily be correct when writing the PDB. It also makes it difficult/impossible to add new PDB documents to a PdbTypeDefinitionDocumentsDebugInfo since we don't know the metadata tokens before we write the PDB file.
This is indeed the case, I think it's a good idea to change the collection in the I'm currently looking for a good way to allow the reader to use PdbDocument objects but for now I do not have many ideas :/ |
I haven't looked at that code in a while, but can't you pass in some new context that the portable pdb reader can use? Some property with some interface that has a method it needs and can call, and nothing else. |
|
I've taken another look at the code and I've come up with two potential ways to implement this so that Both ways will require some modification to Now onto the two different ways of implementing this.
public IList<PdbDocument> Documents {
get {
if (documents is null)
InitializeCustomDebugInfos();
return documents;
}
}
protected IList<PdbDocument> documents;
protected virtual void InitializeDocuments() => Interlocked.CompareExchange(ref documents, new List<PdbDocument>(), null);The These implementation ideas are of course open to discussion, please let me know which implementation you would prefer and I will go through with it :p |
|
Yeah, the 2nd one sounds better. Also you can add an MDToken to PdbDocument/SymbolDocument if needed, even if it's not used by Windows PDBs. PdbState could read that property. |
|
Thanks, merged! |
Add support for the following CustomDebugInfos:
TypeDefinitionDocumentscustom debug information #430)