Skip to content

Fix PDB Symbol Resolution for Unmerged Windows Traces#2407

Merged
brianrob merged 2 commits intomicrosoft:mainfrom
brianrob:brianrob/symbol-resolution-unmerged
Apr 9, 2026
Merged

Fix PDB Symbol Resolution for Unmerged Windows Traces#2407
brianrob merged 2 commits intomicrosoft:mainfrom
brianrob:brianrob/symbol-resolution-unmerged

Conversation

@brianrob
Copy link
Copy Markdown
Member

@brianrob brianrob commented Apr 9, 2026

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 because the ETL doesn't contain RSDS events with PDB identity info. This caused BinaryFormat to return Unspecified (formerly Unknown), hitting the default case which skipped symbol resolution entirely.

Symptoms:

[Loading symbols for c:\windows\system32\ntoskrnl.exe]
LookupSymbolsForModule: Unknown binary format Unknown for c:\windows\system32\ntoskrnl.exe, skipping.
Could not find symbols.

Fix:

  • Add a case ModuleBinaryFormat.Unspecified that falls back to PDB lookup when running on Windows. OpenPdbForModuleFile already handles missing PDB signatures gracefully by checking the local file on disk.
  • Rename ModuleBinaryFormat.Unknown to Unspecified to better reflect that the format was not specified in the trace data rather than being truly unknown.

brianrob and others added 2 commits April 9, 2026 10:27
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>
@brianrob brianrob marked this pull request as ready for review April 9, 2026 17:37
@brianrob brianrob requested a review from a team as a code owner April 9, 2026 17:37
Copy link
Copy Markdown
Collaborator

@leculver leculver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I was being intentional about making sure this happens specifically on a Windows machine because we use msdia underneath.

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