internal Module CreateModule(string name, SymbolFile symfile) { if (symfile == null) { throw new NullReferenceException(); } lock (this) { Module module = (Module)modules [name]; if (module != null) { return(module); } ModuleGroup group; if (is_user_module(symfile.CodeBase)) { group = Config.GetModuleGroup("user"); } else { group = Config.GetModuleGroup(symfile); } module = new Module(group, name, symfile); modules.Add(name, module); return(module); } }
internal void UnLoadModule() { if (ModuleUnloadedEvent != null) { ModuleUnloadedEvent(this); } this.symfile = null; }
// <summary> // Find method @name, which must be a full method name including the // signature (System.DateTime.GetUtcOffset(System.DateTime)). // </summary> public MethodSource FindMethod(string name) { if (!SymbolsLoaded) { return(null); } return(SymbolFile.FindMethod(name)); }
internal void LoadModule(SymbolFile symfile) { this.symfile = symfile; OnModuleChanged(); if (ModuleLoadedEvent != null) { ModuleLoadedEvent(this); } }
internal ModuleGroup GetModuleGroup(SymbolFile symfile) { foreach (ModuleGroup group in module_groups.Values) { if (group.Regexp == null) { continue; } try { if (Regex.IsMatch(symfile.FullName, group.Regexp)) { return(group); } } catch { } } if (symfile.IsNative) { if (symfile.FullName.EndsWith("/mono")) { return(GetModuleGroup("runtime")); } else if (symfile.HasDebuggingInfo) { return(GetModuleGroup("dll")); } else { return(GetModuleGroup("native")); } } else { string assembly_name = symfile.FullName; int pos = assembly_name.IndexOf(','); if (pos > 0) { assembly_name = assembly_name.Substring(0, pos); } string[] corlib_assemblies = { "mscorlib", "System" }; foreach (string name in corlib_assemblies) { if (assembly_name == name) { return(GetModuleGroup("corlib")); } } return(GetModuleGroup("managed")); } }
internal StackFrame UnwindStack(StackFrame last_frame, TargetMemoryAccess memory) { return(SymbolFile.UnwindStack(last_frame, memory)); }
public Symbol SimpleLookup(TargetAddress address, bool exact_match) { return(SymbolFile.SimpleLookup(address, exact_match)); }
public Method GetMethod(int domain, long handle) { return(SymbolFile.GetMethod(domain, handle)); }
public MethodSource[] GetMethods(SourceFile file) { return(SymbolFile.GetMethods(file)); }
internal Module(ModuleGroup group, string name, SymbolFile symfile) : base(name) { this.group = group; this.symfile = symfile; }
internal void UnLoadModule() { if (ModuleUnloadedEvent != null) ModuleUnloadedEvent (this); this.symfile = null; }
internal void LoadModule(SymbolFile symfile) { this.symfile = symfile; OnModuleChanged (); if (ModuleLoadedEvent != null) ModuleLoadedEvent (this); }
internal ModuleGroup GetModuleGroup(SymbolFile symfile) { foreach (ModuleGroup group in module_groups.Values) { if (group.Regexp == null) continue; try { if (Regex.IsMatch (symfile.FullName, group.Regexp)) return group; } catch { } } if (symfile.IsNative) { if (symfile.FullName.EndsWith ("/mono")) return GetModuleGroup ("runtime"); else if (symfile.HasDebuggingInfo) return GetModuleGroup ("dll"); else return GetModuleGroup ("native"); } else { string assembly_name = symfile.FullName; int pos = assembly_name.IndexOf (','); if (pos > 0) assembly_name = assembly_name.Substring (0, pos); string[] corlib_assemblies = { "mscorlib", "System" }; foreach (string name in corlib_assemblies) { if (assembly_name == name) return GetModuleGroup ("corlib"); } return GetModuleGroup ("managed"); } }
internal Module CreateModule(string name, SymbolFile symfile) { if (symfile == null) throw new NullReferenceException (); lock (this) { Module module = (Module) modules [name]; if (module != null) return module; ModuleGroup group; if (is_user_module (symfile.CodeBase)) group = Config.GetModuleGroup ("user"); else group = Config.GetModuleGroup (symfile); module = new Module (group, name, symfile); modules.Add (name, module); return module; } }