Skip to content
Merged
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
7 changes: 6 additions & 1 deletion src/coreclr/tools/aot/ILCompiler.Diagnostics/PdbWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,12 @@ private void WritePDBDataHelper(string dllPath, IEnumerable<MethodInfo> methods)
const int capacity = 1024;
var pdbFilePathBuilder = new char[capacity];
_ngenWriter.QueryPDBNameExW(pdbFilePathBuilder, new IntPtr(capacity - 1) /* remove 1 byte for null */);
_pdbFilePath = pdbFilePathBuilder.ToString();
int length = 0;
while (length < pdbFilePathBuilder.Length && pdbFilePathBuilder[length] != '\0')
{
length++;
}
_pdbFilePath = new string(pdbFilePathBuilder, 0, length);
}

_ngenWriter.OpenModW(originalDllPath, Path.GetFileName(originalDllPath), out _pdbMod);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ private SymNgenWriterWrapper(IntPtr writer2Inst)
{
var iid = ISymNGenWriter2.IID;
int hr = Marshal.QueryInterface(ptr, ref iid, out IntPtr ngenWriterInst);
Marshal.Release(ptr);
if (hr != 0)
{
return null;
Expand Down