Exemple #1
0
        // EnumModules is called by the debugger when it needs to enumerate the modules in the program.
        public int EnumModules(out IEnumDebugModules2 ppEnum)
        {
            AssertMainThread();

            AD7Module[] moduleObjects = new AD7Module[_modules.Count];
            int i = 0;
            foreach (var keyValue in _modules) {
                var module = keyValue.Key;
                var adModule = keyValue.Value;

                moduleObjects[i++] = adModule;
            }

            ppEnum = new AD7ModuleEnum(moduleObjects);

            return VSConstants.S_OK;
        }
Exemple #2
0
        private void SendModuleLoaded(AD7Module ad7Module)
        {
            AD7ModuleLoadEvent eventObject = new AD7ModuleLoadEvent(ad7Module, true /* this is a module load */);

            // TODO: Bind breakpoints when the module loads

            Send(eventObject, AD7ModuleLoadEvent.IID, null);
        }
Exemple #3
0
 private void OnModuleLoaded(object sender, ModuleLoadedEventArgs e)
 {
     lock (_syncLock) {
         var adModule = _modules[e.Module] = new AD7Module(e.Module);
         if (_programCreated) {
             SendModuleLoaded(adModule);
         } else {
             _startModule = adModule;
         }
     }
 }
Exemple #4
0
        private void SendLoadComplete(AD7Thread thread)
        {
            Debug.WriteLine("Sending load complete" + GetHashCode());
            AD7ProgramCreateEvent.Send(this);

            Send(new AD7LoadCompleteEvent(), AD7LoadCompleteEvent.IID, thread);

            if (_startModule != null) {
                SendModuleLoaded(_startModule);
                _startModule = null;
            }
            if (_startThread != null) {
                SendThreadStart(_startThread);
                _startThread = null;
            }
            _processLoadedThread = null;
            _loadComplete.Set();

            var attached = EngineAttached;
            if (attached != null) {
                attached(this, new AD7EngineEventArgs(this));
            }
        }
Exemple #5
0
 public AD7ModuleLoadEvent(AD7Module module, bool fLoad)
 {
     m_module = module;
     m_fLoad = fLoad;
 }