public void Close() { InitWriter(); foreach (Method method in methods) { int remappedToken = method.token; remap.TryGetValue(remappedToken, out remappedToken); symUnmanagedWriter.OpenMethod(remappedToken); if (method.document != null) { ISymUnmanagedDocumentWriter doc = method.document.GetUnmanagedDocument(symUnmanagedWriter); symUnmanagedWriter.DefineSequencePoints(doc, method.offsets.Length, method.offsets, method.lines, method.columns, method.endLines, method.endColumns); } foreach (Scope scope in method.scopes) { scope.Do(symUnmanagedWriter); } symUnmanagedWriter.CloseMethod(); } foreach (Document doc in documents.Values) { doc.Release(); } symUnmanagedWriter.Close(); Marshal.ReleaseComObject(symUnmanagedWriter); symUnmanagedWriter = null; documents.Clear(); methods.Clear(); remap.Clear(); reversemap.Clear(); }
public void DefineSequencePoints( object doc, int[] offsets, int[] lines, int[] cols, int[] endLines, int[] endCols) { ISymUnmanagedDocumentWriter pDoc = (ISymUnmanagedDocumentWriter)doc; writer.DefineSequencePoints(pDoc, offsets.Length, offsets, lines, cols, endLines, endCols); }
public override void DefineSequencePoints(ISymbolDocumentWriter document, uint arraySize, int[] offsets, int[] lines, int[] columns, int[] endLines, int[] endColumns) { if (document is not SymbolDocumentWriter doc) { throw new ArgumentException("document isn't a non-null SymbolDocumentWriter instance"); } writer.DefineSequencePoints(doc.SymUnmanagedDocumentWriter, arraySize, offsets, lines, columns, endLines, endColumns); }
public void DefineSequencePoints(ISymbolDocumentWriter document, int[] offsets, int[] lines, int[] columns, int[] endLines, int[] endColumns) { var doc = document as SymbolDocumentWriter; if (doc == null) { throw new ArgumentException("document isn't a non-null SymbolDocumentWriter instance"); } if (offsets == null || lines == null || columns == null || endLines == null || endColumns == null || offsets.Length != lines.Length || offsets.Length != columns.Length || offsets.Length != endLines.Length || offsets.Length != endColumns.Length) { throw new ArgumentException("Invalid arrays"); } writer.DefineSequencePoints(doc.SymUnmanagedDocumentWriter, (uint)offsets.Length, offsets, lines, columns, endLines, endColumns); }
private void WriteSequencePoints(ISymUnmanagedDocumentWriter symDocument, int count) { try { _symWriter.DefineSequencePoints( symDocument, (uint)count, _sequencePointOffsets, _sequencePointStartLines, _sequencePointStartColumns, _sequencePointEndLines, _sequencePointEndColumns); } catch (Exception ex) { throw new PdbWritingException(ex); } }
private void WriteSource(Source source) { var sequencePoints = source.SequencePoints; var count = sequencePoints.Count; var offsets = new int[count]; var lines = new int[count]; var columns = new int[count]; var endLines = new int[count]; var endColumns = new int[count]; for (int i = 0; i < sequencePoints.Count; i++) { var sequencePoint = sequencePoints[i]; offsets[i] = sequencePoint.Offset; lines[i] = sequencePoint.Line; columns[i] = sequencePoint.Column; endLines[i] = sequencePoint.EndLine; endColumns[i] = sequencePoint.EndColumn; } pdb.DefineSequencePoints(UnmanagedDocumentFor(source.Document), count, offsets, lines, columns, endLines, endColumns); }
public void DefineSequencePoints(SymDocumentWriter document, int[] offsets, int[] lines, int[] columns, int[] endLines, int[] endColumns) { m_writer.DefineSequencePoints(document.GetUnmanaged(), offsets.Length, offsets, lines, columns, endLines, endColumns); }