Inheritance: DebuggerMarshalByRefObject, IDisposable
Beispiel #1
0
        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);
            }
        }
Beispiel #2
0
 internal void UnLoadModule()
 {
     if (ModuleUnloadedEvent != null)
     {
         ModuleUnloadedEvent(this);
     }
     this.symfile = null;
 }
Beispiel #3
0
        // <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));
        }
Beispiel #4
0
 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"));
            }
        }
Beispiel #6
0
 internal StackFrame UnwindStack(StackFrame last_frame,
                                 TargetMemoryAccess memory)
 {
     return(SymbolFile.UnwindStack(last_frame, memory));
 }
Beispiel #7
0
 public Symbol SimpleLookup(TargetAddress address, bool exact_match)
 {
     return(SymbolFile.SimpleLookup(address, exact_match));
 }
Beispiel #8
0
 public Method GetMethod(int domain, long handle)
 {
     return(SymbolFile.GetMethod(domain, handle));
 }
Beispiel #9
0
 public MethodSource[] GetMethods(SourceFile file)
 {
     return(SymbolFile.GetMethods(file));
 }
Beispiel #10
0
 internal Module(ModuleGroup group, string name, SymbolFile symfile)
     : base(name)
 {
     this.group   = group;
     this.symfile = symfile;
 }
Beispiel #11
0
 internal Module(ModuleGroup group, string name, SymbolFile symfile)
     : base(name)
 {
     this.group = group;
     this.symfile = symfile;
 }
Beispiel #12
0
 internal void UnLoadModule()
 {
     if (ModuleUnloadedEvent != null)
         ModuleUnloadedEvent (this);
     this.symfile = null;
 }
Beispiel #13
0
 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");
            }
        }
Beispiel #15
0
        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;
            }
        }