runtime
runtime copied to clipboard
[Linux] [SOS.NETCore] Path.GetFileName error for Windows-style path on Linux
In SOS.SymbolReader we obtain path to PDB file form assembly's DebugDirectoryEntry. If however assembly was built on Windows machine (by dotnet cli toolchain) such entry contains full Windows-style path. When we're trying to extract file name from this full path on Linux machine during debugging session the Path.GetFileName returns the same full path, so when combined with directory name of assembly results invalid path and prevents opening PDB. See src/ToolBox/SOS/NETCore/SymbolReader.cs, TryOpenReaderFromCodeView method.
cc @mikem8361 @kvochko @lucenticus @seanshpark @chunseoklee
Fix with PR dotnet/coreclr#7441