Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,15 @@ private PdbSymbolReader OpenAssociatedSymbolFile(string peFilePath, PEReader peR
if (debugEntry.Type != DebugDirectoryEntryType.CodeView)
continue;

CodeViewDebugDirectoryData debugDirectoryData = peReader.ReadCodeViewDebugDirectoryData(debugEntry);
CodeViewDebugDirectoryData debugDirectoryData;
try
{
debugDirectoryData = peReader.ReadCodeViewDebugDirectoryData(debugEntry);
}
catch (BadImageFormatException)
{
continue;
}

string candidatePath = debugDirectoryData.Path;
if (!Path.IsPathRooted(candidatePath) || !File.Exists(candidatePath))
Comment on lines +338 to 342
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

There’s an extra double-space before the '=' in the candidatePath declaration; please normalize spacing to a single space for consistency/readability.

Copilot uses AI. Check for mistakes.
Expand Down
10 changes: 9 additions & 1 deletion src/coreclr/tools/dotnet-pgo/TraceTypeSystemContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,15 @@ private PdbSymbolReader OpenAssociatedSymbolFile(string peFilePath, PEReader peR
if (debugEntry.Type != DebugDirectoryEntryType.CodeView)
continue;

CodeViewDebugDirectoryData debugDirectoryData = peReader.ReadCodeViewDebugDirectoryData(debugEntry);
CodeViewDebugDirectoryData debugDirectoryData;
try
{
debugDirectoryData = peReader.ReadCodeViewDebugDirectoryData(debugEntry);
}
catch (BadImageFormatException)
{
continue;
}

string candidatePath = debugDirectoryData.Path;
if (!Path.IsPathRooted(candidatePath) || !File.Exists(candidatePath))
Expand Down
Loading