public SourceAddress(SourceFile file, SourceBuffer buffer, int row, int line_offset, int line_range) { this.file = file; this.buffer = buffer; this.row = row; this.line_offset = line_offset; this.line_range = line_range; }
public SourceLocation(SourceFile file, int line, int column) : this(new DynamicSourceLocation (file, line, column)) { Module = file.Module.Name; FileName = file.FileName; Name = file.FileName + ":" + line; Line = line; Column = column; }
public SourceLocation(MethodSource source, SourceFile file, int line, int column) : this(new DynamicSourceLocation (source, file, line, column)) { Module = file.Module.Name; FileName = file.FileName; Method = source.Name; if (line != -1) Name = source.Name + ':' + line; else Name = source.Name; Line = line; Column = column; }
public SourceLocation(MethodSource source, SourceFile file, int line) : this(source, file, line, -1) { }
public DynamicSourceLocation(TargetFunctionType function, int line, int column) { this.function = function; this.file = null; this.module = function.Module; this.line = line; this.column = column; }
public DynamicSourceLocation(SourceFile file, int line, int column) { this.module = file.Module; this.file = file; this.line = line; this.column = column; }
public SourceLocation(SourceFile file, int line) : this(file, line, -1) { }
public abstract MethodSource[] GetMethods(SourceFile file);
public void PrintMethods(SourceFile source) { Print ("Methods from source file {0}: {1}", source.ID, source.FileName); PrintMethods (source.Methods); }
public SourceFile[] GetSources() { ensure_sources (); SourceFile[] retval = new SourceFile [sources.Count]; sources.CopyTo (retval, 0); return retval; }
public override MethodSource[] GetMethods(SourceFile file) { ensure_sources (); C.SourceFileEntry source = source_hash [file]; List<MethodSource> methods = new List<MethodSource> (); foreach (C.MethodEntry method in File.Methods) { var cfile = source_file_hash [method.CompileUnit.SourceFile]; Cecil.MethodDefinition mdef = MonoDebuggerSupport.GetMethod ( ModuleDefinition, method.Token); if (method.CompileUnit.SourceFile.Index == source.Index) { methods.Add (GetMethodSource (cfile, method.Index)); continue; } foreach (C.SourceFileEntry include in method.CompileUnit.IncludeFiles) { if (include.Index == source.Index) { methods.Add (GetMethodSource (cfile, method.Index)); break; } } } return methods.ToArray (); }
public MonoMethodSource(MonoSymbolFile file, SourceFile source_file, C.MethodEntry method, Cecil.MethodDefinition mdef, MonoClassType klass, MonoFunctionType function) { this.file = file; this.source_file = source_file; this.method = method; this.mdef = mdef; this.function = function; this.klass = klass; full_name = method.GetRealName (); if (full_name == null) full_name = MonoSymbolFile.GetMethodName (mdef); C.LineNumberEntry start, end; C.LineNumberTable lnt = method.GetLineNumberTable (); if (lnt.GetMethodBounds (out start, out end)) start_row = start.Row; end_row = end.Row; }
public SourceAddress(SourceFile file, SourceBuffer buffer, int row, int line_offset, int line_range, SourceRange? source_range) : this(file, buffer, row, line_offset, line_range) { this.source_range = source_range; }
protected MethodSource[] GetMethods(SourceFile file) { if (dwarf != null) return dwarf.GetMethods (file); throw new InvalidOperationException (); }
public override MethodSource[] GetMethods(SourceFile file) { return Bfd.GetMethods (file); }
MonoMethodSource CreateMethodSource(SourceFile file, int index) { C.MethodEntry entry = File.GetMethod (index); Cecil.MethodDefinition mdef = MonoDebuggerSupport.GetMethod ( ModuleDefinition, entry.Token); MonoClassType klass = LookupMonoClass (mdef.DeclaringType); if (klass == null) throw new InternalError (); MonoFunctionType function = klass.LookupFunction (mdef); MonoMethodSource method = new MonoMethodSource ( this, file, entry, mdef, klass, function); method_index_hash.Add (index, method); return method; }
MonoMethodSource GetMethodSource(SourceFile file, int index) { ensure_sources (); MonoMethodSource method = (MonoMethodSource) method_index_hash [index]; if (method != null) return method; return CreateMethodSource (file, index); }
public MethodSource[] GetMethods(SourceFile file) { return SymbolFile.GetMethods (file); }
public DynamicSourceLocation(MethodSource source, SourceFile file, int line, int column) { if (source.IsManaged) { this.function = source.Function; this.module = function.Module; } else { this.module = source.Module; this.source = source; } this.file = file; this.line = line; this.column = column; }
public SourceFile[] GetSources(int[] indices) { Hashtable source_hash = new Hashtable (); Module[] modules = CurrentProcess.Modules; foreach (Module module in modules) { if (!module.SymbolsLoaded) continue; foreach (SourceFile source in module.Sources) source_hash.Add (source.ID, source); } int pos = 0; SourceFile[] retval = new SourceFile [indices.Length]; foreach (int index in indices) { SourceFile source = (SourceFile) source_hash [index]; if (source == null) throw new ScriptingException ( "No such source file: {0}", index); retval [pos++] = source; } return retval; }