Exemplo n.º 1
0
 internal void Add_DbgThread(DbgModuleImpl module)
 {
     Dispatcher.VerifyAccess();
     lock (lockObj)
         modules.Add(module);
     ModulesChanged?.Invoke(this, new DbgCollectionChangedEventArgs <DbgModule>(module, added: true));
 }
Exemplo n.º 2
0
 internal void Remove_DbgThread(DbgModuleImpl module, DbgEngineMessageFlags messageFlags)
 {
     Dispatcher.VerifyAccess();
     lock (lockObj) {
         bool b = modules.Remove(module);
         if (!b)
         {
             return;
         }
     }
     owner.RemoveModule_DbgThread(this, module, messageFlags);
     ModulesChanged?.Invoke(this, new DbgCollectionChangedEventArgs <DbgModule>(module, added: false));
     module.Close(Dispatcher);
 }
Exemplo n.º 3
0
        public override DbgEngineModule CreateModule <T>(DbgAppDomain appDomain, DbgInternalModule internalModule, bool isExe, ulong address, uint size, DbgImageLayout imageLayout, string name, string filename, bool isDynamic, bool isInMemory, bool?isOptimized, int order, DateTime?timestamp, string version, DbgEngineMessageFlags messageFlags, T data, Action <DbgEngineModule> onCreated)
        {
            if (disposed)
            {
                throw new ObjectDisposedException(nameof(DbgObjectFactoryImpl));
            }
            var module = new DbgModuleImpl(runtime, VerifyOptionalAppDomain(appDomain), internalModule, isExe, address, size, imageLayout, name, filename, isDynamic, isInMemory, isOptimized, order, timestamp, version);

            if (data != null)
            {
                module.GetOrCreateData(() => data);
            }
            var engineModule = new DbgEngineModuleImpl(module);

            onCreated?.Invoke(engineModule);
            owner.Dispatcher.BeginInvoke(() => owner.AddModule_DbgThread(runtime, module, messageFlags));
            return(engineModule);
        }
Exemplo n.º 4
0
 public DbgEngineModuleImpl(DbgModuleImpl module) => this.module = module ?? throw new ArgumentNullException(nameof(module));