static SequencePoint LineToSequencePoint(LineNumberEntry line, MethodEntry entry, Document document) { return(new SequencePoint(document) { StartLine = line.Row, EndLine = line.EndRow, StartColumn = line.Column, EndColumn = line.EndColumn, }); }
public void Write(MonoSymbolWriter writer) { LineNumberEntry[] the_lines = new LineNumberEntry [lines.Count]; lines.CopyTo(the_lines, 0); LocalVariableEntry[] locals = method.GetLocalVars(); MethodEntry entry = writer.SymbolFile.DefineMethod( file, Token, null, locals, the_lines, null, null, 0, 0); }
SequencePoint LineToSequencePoint(LineNumberEntry line) { var source = symbol_file.GetSourceFile(line.File); return(new SequencePoint(line.Offset, GetDocument(source)) { StartLine = line.Row, EndLine = line.EndRow, StartColumn = line.Column, EndColumn = line.EndColumn, }); }
private void ReadLineNumbers(MethodEntry entry, MethodSymbols symbols) { LineNumberTable table = entry.GetLineNumberTable(); LineNumberEntry[] lines = table.LineNumbers; Collection <InstructionSymbol> instructions = symbols.instructions = new Collection <InstructionSymbol>(lines.Length); for (int i = 0; i < lines.Length; i++) { LineNumberEntry line = lines[i]; instructions.Add(new InstructionSymbol(line.Offset, new SequencePoint(this.GetDocument(entry.CompileUnit.SourceFile)) { StartLine = line.Row, EndLine = line.Row })); } }
private void ReadLineNumbers(MethodEntry entry, InstructionMapper mapper) { Document document = null; LineNumberTable table = entry.GetLineNumberTable(); LineNumberEntry[] lineNumbers = table.LineNumbers; for (int i = 0; i < lineNumbers.Length; i++) { LineNumberEntry line = lineNumbers[i]; Instruction instruction = mapper(line.Offset); if (instruction != null) { if (document == null) { document = this.GetDocument(entry.CompileUnit.SourceFile); } instruction.SequencePoint = new SequencePoint(document) { StartLine = line.Row, EndLine = line.Row }; } } }
public void MarkSequencePoint(int offset, SourceFileEntry file, int line, int column, int end_line, int end_column, bool is_hidden) { int file_idx = file != null ? file.Index : 0; var lne = new LineNumberEntry (file_idx, line, column, end_line, end_column, offset, is_hidden); if (method_lines.Count > 0) { var prev = method_lines[method_lines.Count - 1]; // // Same offset cannot be used for multiple lines // if (prev.Offset == offset) { // // Use the new location because debugger will adjust // the breakpoint to next line with sequence point // if (LineNumberEntry.LocationComparer.Default.Compare (lne, prev) > 0) method_lines[method_lines.Count - 1] = lne; return; } } method_lines.Add (lne); }
static SequencePoint LineToSequencePoint(LineNumberEntry line, MethodEntry entry, Document document) { return new SequencePoint (document) { StartLine = line.Row, EndLine = line.EndRow, StartColumn = line.Column, EndColumn = line.EndColumn, }; }
public MethodEntry DefineMethod(CompileUnitEntry comp_unit, int token, ScopeVariable[] scope_vars, LocalVariableEntry[] locals, LineNumberEntry[] lines, CodeBlockEntry[] code_blocks, string real_name, MethodEntry.Flags flags, int namespace_id) { if (reader != null) throw new InvalidOperationException (); MethodEntry method = new MethodEntry ( this, comp_unit, token, scope_vars, locals, lines, code_blocks, real_name, flags, namespace_id); AddMethod (method); return method; }