-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
SourceLink returning incorrect PDB info #111138
SourceLink returning incorrect PDB info #111138
Comments
This issue appears to be specific to type definitions that are not an implementation, for example an interface like Considering the attached DLL and PDB pair (see bottom of message)
Previously, non implementation types were not ever added to the Documents table at all. And this appears to be the case in this instance as well, However - support for non implementation types in the documents table was added in dotnet/roslyn#56278 (3 yrs ago), I think the next step is to see if the compiler is writing the correct output into the pdb (with both the item added to the documents table and the customdebuginformation pointing to it). |
I verified the compiler changes in dotnet/roslyn#56278 seem to still be working fine: A TypeDef for an inteface (02000003) Gets CustomDebugInformation record added for it and a Document record, which is pointed to by the value in the CustomDebugInformation: The System.Private.CoreLib.pdb has a CustomDebugInformation record for @stephentoub @tannergooding @jkoritzinsky do you know if the runtime build does anything interesting here? |
Another report on Reddit, this time Gentle nudge @stephentoub @tannergooding @jkoritzinsky if any of you have any knowledge of possible post-processing PDBs go through in the runtime repo? |
Pdb2Pdb in arcade is used as part of publishing. That's the only post processing I know of. |
@tmat do you have any idea what might be happening here? The compiler only emits TypeDefinitionDocuments info for portable PDBs so the fact that its present indicates to me that the PDB is portable, so I wouldn't think Pdb2Pdb is relevant, but I don't actually know how it's used. I guess if Pdb2Pdb converts to Windows PDBs, and those are what is being downloaded from symbol servers, then maybe it is maintaining the contents of the CustomDebugInformation table, but inadvertently stripping out some of the contents of the Document table? |
Seems like dup of #100051 |
At this point I'm fairly confident the issue is with how the runtime is creating the pdbs and there isn't any action to take on the Roslyn side. Transferring to the runtime repo. We're still getting pdbs with 9.0.100 that are missing the interface types in the document table (and custom debug info pointing to the wrong document). Is it possible the bug in cecil (linked above by Tomas) was fixed, but the runtime is still on an older version of it with the issue? |
Tagging subscribers to this area: @tommcdon |
Tagging subscribers to this area: @dotnet/runtime-infrastructure |
Tagging subscribers to this area: @hoyosjs |
Moving to area-infrastructure-coreclr to take a first look |
Version Used: 4.13.0-2.24561.3 (24e1dd6b)
Steps to Reproduce:
dotnet.navigation.navigateToSourceLinkAndEmbeddedSources
is enabled in vscode. Or, if using vs, make sure sourcelink is enabled there.IEnumerable
Expected Behavior:
SourceLink opens https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/IEnumerable.cs
Actual Behavior:
SourceLink opens https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/TypeUnloadedException.cs.
The text was updated successfully, but these errors were encountered: