示例#1
0
 internal DnAssembly(DnAppDomain appDomain, ICorDebugAssembly assembly, int incrementedId)
 {
     this.appDomain = appDomain;
     this.modules = new DebuggerCollection<ICorDebugModule, DnModule>(CreateModule);
     this.assembly = new CorAssembly(assembly);
     this.incrementedId = incrementedId;
 }
 //
 // IEnumerator interface
 //
 public bool MoveNext ()
 {
     ICorDebugAssembly[] a = new ICorDebugAssembly[1];
     uint c = 0;
     int r = m_enum.Next ((uint) a.Length, a, out c);
     if (r==0 && c==1) // S_OK && we got 1 new element
         m_asm = new CorAssembly (a[0]);
     else
         m_asm = null;
     return m_asm != null;
 }
 public CorAssembly(ICorDebugAssembly assembly)
 {
     corAssembly = assembly;
     char[] name = new char[300];
     uint sz = 0;
     corAssembly.GetName((uint)name.Length, out sz, name);
     fullName = new String(name, 0, (int)(sz - 1));
     if (fullName.Contains(Path.DirectorySeparatorChar))
     {
         assemblyname = Path.GetFileName(fullName);
         location = Path.GetDirectoryName(fullName);
     }
     else {
         assemblyname = location = fullName;
     }
 }
示例#4
0
        private IList<DebugAssembly> LoadAssemblies()
        {
            ICorDebugAssemblyEnum assembliesEnum;
            _domain.EnumerateAssemblies(out assembliesEnum);
            uint assembliesCount;
            assembliesEnum.GetCount(out assembliesCount);

            ICorDebugAssembly[] assemblies = new ICorDebugAssembly[assembliesCount];
            uint actualAssembliesCount;
            assembliesEnum.Next(assembliesCount, assemblies, out actualAssembliesCount);

            var result = new List<DebugAssembly>((int)actualAssembliesCount);
            for (int i = 0; i < actualAssembliesCount; i++)
            {
                result.Add(new DebugAssembly(assemblies[i]));
            }

            return result;
        }
示例#5
0
 internal void AssemblyUnloaded(ICorDebugAssembly comAssembly)
 {
     var assembly = assemblies.TryGet(comAssembly);
     if (assembly == null)
         return;
     assembly.SetHasUnloaded();
     assemblies.Remove(comAssembly);
 }
示例#6
0
 DnAssembly CreateAssembly(ICorDebugAssembly comAssembly, int id)
 {
     return new DnAssembly(this, comAssembly, id);
 }
示例#7
0
		DnAssembly CreateAssembly(ICorDebugAssembly comAssembly) {
			return new DnAssembly(this, comAssembly, Debugger.GetNextAssemblyId(), Process.GetNextAssemblyId(), Interlocked.Increment(ref nextAssemblyId));
		}
		public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
		{
			EnterCallback(PausedReason.Other, "UnloadAssembly", pAppDomain);
			
			ExitCallback();
		}
 public virtual void UnloadAssembly(ICorDebugAppDomain appDomain, ICorDebugAssembly assembly)
 {
     this.DefaultHandler(appDomain);
 }
示例#10
0
 int ICorDebugModule2.ResolveAssembly(uint tkAssemblyRef, out ICorDebugAssembly ppAssembly)
 {
     ppAssembly = null;
     return(COM_HResults.S_OK);
 }
示例#11
0
 public UnloadAssemblyDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
     : base(pAppDomain, pAssembly)
 {
 }
示例#12
0
		public UnloadAssemblyDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
			: base(pAppDomain, pAssembly) {
		}
示例#13
0
            void ICorDebugManagedCallback.UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
            {
                var ev = new CorEventArgs(new CorAppDomain(pAppDomain, p_options));

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#14
0
 protected AssemblyDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
     : base(pAppDomain)
 {
     this.AppDomain = pAppDomain;
     this.Assembly  = pAssembly;
 }
示例#15
0
        public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
        {
            EnterCallback(PausedReason.Other, "UnloadAssembly", pAppDomain);

            ExitCallback();
        }
示例#16
0
 public void UnloadAssembly(ICorDebugAppDomain appDomain,
                            ICorDebugAssembly assy)
 {
 }
示例#17
0
 public void LoadAssembly(ICorDebugAppDomain appDomain,
                          ICorDebugAssembly assy)
 {
     MessageBox.Show("Load assy: " + assy);
 }
		public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
		{
			ManagedCallback managedCallback = GetProcessCallbackInterface("UnloadAssembly", pAppDomain);
			if (managedCallback != null) {
				managedCallback.UnloadAssembly(pAppDomain, pAssembly);
			}
		}
 internal RuntimeAssembly(RuntimeAppDomain domain, ICorDebugAssembly comAssembly)
 {
     _domain = domain;
     _comAssembly = comAssembly;
 }
示例#20
0
		internal DnAssembly(DnAppDomain appDomain, ICorDebugAssembly assembly, int uniqueId, int uniqueIdProcess, int uniqueIdAppDomain) {
			AppDomain = appDomain;
			modules = new DebuggerCollection<ICorDebugModule, DnModule>(CreateModule);
			CorAssembly = new CorAssembly(assembly);
			UniqueId = uniqueId;
			UniqueIdProcess = uniqueIdProcess;
			UniqueIdAppDomain = uniqueIdAppDomain;
		}
 internal DebuggedAssembly(ICorDebugAssembly a)
 {
     m_asm = a;
 }
示例#22
0
 public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
 {
     var assembly = new DebugAssembly(pAssembly);
     Logger.WriteLine("Unloaded {0} assembly", assembly.Name);
     pAppDomain.Continue(0);
 }
        int ICorDebugModule.GetAssembly( out ICorDebugAssembly ppAssembly )
        {
            ppAssembly = this;

            return Utility.COM_HResults.S_OK;
        }
示例#24
0
            public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
            {
                try
                {
                    _EnterCallback();

                    _CallbackNotImplemented();

                    _CallbackEvent("UnloadAssembly");
                }
                catch (Exception e)
                {
                    _CallbackException(e);
                }
            }
示例#25
0
 public void UnloadAssembly([In, MarshalAs(UnmanagedType.Interface)] ICorDebugAppDomain pAppDomain, [In, MarshalAs(UnmanagedType.Interface)] ICorDebugAssembly pAssembly)
 {
     throw new NotImplementedException();
 }
示例#26
0
 int ICorDebugModule.GetName(uint cchName, IntPtr pcchName, IntPtr szName)
 {
     return(ICorDebugAssembly.GetName(cchName, pcchName, szName));
 }
示例#27
0
 internal RuntimeAssembly GetAssembly(ICorDebugAssembly assembly)
 {
     return(_assemblies[assembly]);
 }
 internal DebugAssembly(ICorDebugAssembly assembly)
 {
     this.assembly = assembly;
 }
示例#29
0
        public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
        {
            EnterCallback("UnloadAssembly", pAppDomain);

            ExitCallback();
        }
 int ICorDebugModule2.ResolveAssembly( uint tkAssemblyRef, out ICorDebugAssembly ppAssembly )
 {
     ppAssembly = null;
     return Utility.COM_HResults.S_OK;
 }
 public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
 {
     controller.Continue(0);
 }
 internal RuntimeAssembly GetAssembly(ICorDebugAssembly assembly)
 {
     return _assemblies[assembly];
 }
示例#33
0
 internal CorAssembly (ICorDebugAssembly managedAssembly)
     :base(managedAssembly)
 { 
     m_asm = managedAssembly;
 }
示例#34
0
 /// <summary>
 /// Gets an Assembly or null
 /// </summary>
 /// <param name="comAssembly">Assembly</param>
 /// <returns></returns>
 public DnAssembly TryGetAssembly(ICorDebugAssembly comAssembly)
 {
     Debugger.DebugVerifyThread();
     return assemblies.TryGet(comAssembly);
 }
示例#35
0
 internal RuntimeAssembly(RuntimeAppDomain domain, ICorDebugAssembly comAssembly)
 {
     _domain      = domain;
     _comAssembly = comAssembly;
 }
示例#36
0
 internal DnAssembly TryAdd(ICorDebugAssembly comAssembly)
 {
     return assemblies.Add(comAssembly);
 }
 public virtual void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly) { pAppDomain.Continue(0); }
 public static void ResolveAssembly(this ICorDebugModule2 instance, uint tkAssemblyRef, ref ICorDebugAssembly ppAssembly)
 {
     instance.__ResolveAssembly(tkAssemblyRef, ref ppAssembly);
 }
示例#39
0
 public virtual void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
 {
     pAppDomain.Continue(0);
 }
示例#40
0
 internal CorAssembly (ICorDebugAssembly managedAssembly)
     :base(managedAssembly)
 { 
     m_asm = managedAssembly;
 }
示例#41
0
            void ICorDebugManagedCallback.UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
            {
                var ev = new CorEventArgs(GetCachedAppDomain(pAppDomain), "UnloadAssembly");

                GetOwner(ev.Controller).DispatchEvent(ev);

                FinishEvent(ev);
            }
示例#42
0
		protected AssemblyDebugCallbackEventArgs(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
			: base(pAppDomain) {
			this.AppDomain = pAppDomain;
			this.Assembly = pAssembly;
		}
示例#43
0
 internal DnAssembly TryAdd(ICorDebugAssembly comAssembly)
 {
     return(assemblies.Add(comAssembly));
 }
示例#44
0
 DnAssembly CreateAssembly(ICorDebugAssembly comAssembly, int id)
 {
     return(new DnAssembly(this, comAssembly, id));
 }
示例#45
0
 public DnAssembly TryGetAssembly(ICorDebugAssembly comAssembly)
 {
     Debugger.DebugVerifyThread();
     return(assemblies.TryGet(comAssembly));
 }
 public void AssemblyLoad_Unload(ICorDebugAppDomain appDomain, ICorDebugAssembly assembly,bool action)
 {
     AssemblyNotification(new CorDebugAppDomain(appDomain),new CorAssembly(assembly), action);
 }
示例#47
0
 DnAssembly CreateAssembly(ICorDebugAssembly comAssembly) =>
 new DnAssembly(this, comAssembly, Debugger.GetNextAssemblyId(), Process.GetNextAssemblyId(), Interlocked.Increment(ref nextAssemblyId));
示例#48
0
            public void LoadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
            {
                try
                {
                    _EnterCallback();

                    lock (dbgproc)
                    {
                        dbgproc.iassemblies.Add(pAssembly);
                    }

                    _ResumeCallback();

                    _CallbackEvent("LoadAssembly");
                }
                catch (Exception e)
                {
                    _CallbackException(e);
                }
            }
示例#49
0
 internal DnAssembly TryAdd(ICorDebugAssembly comAssembly) => assemblies.Add(comAssembly);
示例#50
0
		public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
		{
			EnterCallback("UnloadAssembly", pAppDomain);
			
			ExitCallback();
		}
示例#51
0
        int ICorDebugModule.GetAssembly(out ICorDebugAssembly ppAssembly)
        {
            ppAssembly = this;

            return(Utility.COM_HResults.S_OK);
        }
示例#52
0
 void ICorDebugManagedCallback.UnloadAssembly(
                             ICorDebugAppDomain appDomain,
                             ICorDebugAssembly assembly)
 {
     HandleEvent(ManagedCallbackType.OnAssemblyUnload,
                       new CorAssemblyEventArgs( appDomain == null ? null : new CorAppDomain(appDomain),
                                                 assembly == null ? null : new CorAssembly(assembly),
                                                 ManagedCallbackType.OnAssemblyUnload));
 }
示例#53
0
 public void UnloadAssembly(ICorDebugAppDomain pAppDomain, ICorDebugAssembly pAssembly)
 {
     Console.WriteLine("UnloadAssembly");
     pAppDomain.Continue(0);
 }