Fix PDB Symbol Resolution for Unmerged Windows Traces#2407
Merged
brianrob merged 2 commits intomicrosoft:mainfrom Apr 9, 2026
Merged
Fix PDB Symbol Resolution for Unmerged Windows Traces#2407brianrob merged 2 commits intomicrosoft:mainfrom
brianrob merged 2 commits intomicrosoft:mainfrom
Conversation
The ELF symbol work introduced a switch on BinaryFormat in LookupSymbolsForModule that only handled PE and ELF cases. For unmerged Windows traces, symbolInfo is null (no RSDS events in the ETL), so BinaryFormat returns Unspecified, causing symbol resolution to be skipped entirely. Add a case for ModuleBinaryFormat.Unspecified that falls back to PDB lookup on Windows. OpenPdbForModuleFile handles missing PDB signatures gracefully by checking the local file on disk. Also rename ModuleBinaryFormat.Unknown to Unspecified to better reflect that the format was not specified in the trace data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
leculver
approved these changes
Apr 9, 2026
Collaborator
leculver
left a comment
There was a problem hiding this comment.
Non blocking question, otherwise looks good.
| // didn't contain RSDS events with PDB identity info. | ||
| // Fall back to PDB lookup on Windows, which handles missing signatures | ||
| // gracefully and returns null if the file isn't a PE binary. | ||
| if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) |
Collaborator
There was a problem hiding this comment.
IsOSPlatform is the right function here? I mean yes we will process ETL files on windows, but there's no "target we are analyzing" concept?
Member
Author
There was a problem hiding this comment.
Yes. I was being intentional about making sure this happens specifically on a Windows machine because we use msdia underneath.
This was referenced Apr 10, 2026
Merged
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.
The ELF symbol work introduced a switch on
BinaryFormatinLookupSymbolsForModulethat only handledPEandELFcases. For unmerged Windows traces,symbolInfois null because the ETL doesn't contain RSDS events with PDB identity info. This causedBinaryFormatto returnUnspecified(formerlyUnknown), hitting the default case which skipped symbol resolution entirely.Symptoms:
Fix:
case ModuleBinaryFormat.Unspecifiedthat falls back to PDB lookup when running on Windows.OpenPdbForModuleFilealready handles missing PDB signatures gracefully by checking the local file on disk.ModuleBinaryFormat.UnknowntoUnspecifiedto better reflect that the format was not specified in the trace data rather than being truly unknown.