public void UnloadModule(ICorDebugAppDomain pAppDomain, ICorDebugModule pModule)
        {
            RuntimeAppDomain runtimeDomain = GetProcessWrapper(pAppDomain).GetAppDomain(pAppDomain);

            ICorDebugAssembly comAssembly;

            pModule.GetAssembly(out comAssembly);
            RuntimeAssembly runtimeAssembly = runtimeDomain.GetAssembly(comAssembly);

            var runtimeModule = runtimeAssembly.GetModule(pModule);

            Log("Unloaded module.");

            var eventArgs = new GenericDebuggerEventArgs <RuntimeModule>(runtimeModule, runtimeDomain);

            runtimeAssembly.DispatchModuleUnloadEvent(eventArgs);
            FinalizeEvent(eventArgs);
        }
Exemple #2
0
        internal Module(AppDomain appDomain, ICorDebugModule corModule)
        {
            this.appDomain = appDomain;
            this.process = appDomain.Process;
            this.corModule = corModule;

            metaData = new MetaDataImport(corModule);

            if (IsDynamic || IsInMemory) {
                name     = corModule.GetName();
            } else {
                fullPath = corModule.GetName();
                name     = System.IO.Path.GetFileName(FullPath);
            }
            asmFilename = corModule.GetAssembly().GetName();

            SetJITCompilerFlags();

            LoadSymbolsFromDisk(process.Options.SymbolsSearchPaths);
            ResetJustMyCodeStatus();
        }
Exemple #3
0
        internal Module(AppDomain appDomain, ICorDebugModule corModule)
        {
            this.appDomain = appDomain;
            this.process   = appDomain.Process;
            this.corModule = corModule;

            metaData = new MetaDataImport(corModule);

            if (IsDynamic || IsInMemory)
            {
                name = corModule.GetName();
            }
            else
            {
                fullPath = corModule.GetName();
                name     = System.IO.Path.GetFileName(FullPath);
            }
            asmFilename = corModule.GetAssembly().GetName();

            SetJITCompilerFlags();

            LoadSymbolsFromDisk(process.Options.SymbolsSearchPaths);
            ResetJustMyCodeStatus();
        }
Exemple #4
0
        public DnAssembly TryGetValidAssembly(ICorDebugAppDomain comAppDomain, ICorDebugModule comModule)
        {
            DebugVerifyThread();
            if (comModule == null)
                return null;

            var appDomain = TryGetValidAppDomain(comAppDomain);
            if (appDomain == null)
                return null;

            ICorDebugAssembly comAssembly;
            int hr = comModule.GetAssembly(out comAssembly);
            if (hr < 0)
                return null;

            return appDomain.TryGetAssembly(comAssembly);
        }
        public void UnloadModule(ICorDebugAppDomain pAppDomain, ICorDebugModule pModule)
        {
            RuntimeAppDomain runtimeDomain = GetProcessWrapper(pAppDomain).GetAppDomain(pAppDomain);

            ICorDebugAssembly comAssembly;
            pModule.GetAssembly(out comAssembly);
            RuntimeAssembly runtimeAssembly = runtimeDomain.GetAssembly(comAssembly);

            var runtimeModule = runtimeAssembly.GetModule(pModule);
            Log("Unloaded module.");

            var eventArgs = new GenericDebuggerEventArgs<RuntimeModule>(runtimeModule, runtimeDomain);

            runtimeAssembly.DispatchModuleUnloadEvent(eventArgs);
            FinalizeEvent(eventArgs);
        }