Ejemplo n.º 1
0
		internal DnNativeCodeBreakpoint(DnModuleId module, uint token, uint offset, Func<NativeCodeBreakpointConditionContext, bool> cond)
			: base(module, token, offset) {
			Condition = cond ?? defaultCond;
		}
Ejemplo n.º 2
0
		IEnumerable<DnModule> GetLoadedDnModules(DnModuleId module) {
			foreach (var process in processes.GetAll()) {
				foreach (var appDomain in process.AppDomains) {
					foreach (var assembly in appDomain.Assemblies) {
						foreach (var dnMod in assembly.Modules) {
							if (dnMod.DnModuleId.Equals(module))
								yield return dnMod;
						}
					}
				}
			}
		}
Ejemplo n.º 3
0
		/// <summary>
		/// Creates a native instruction breakpoint
		/// </summary>
		/// <param name="module">Module</param>
		/// <param name="token">Method token</param>
		/// <param name="offset">Offset</param>
		/// <param name="cond">Condition</param>
		/// <returns></returns>
		public DnNativeCodeBreakpoint CreateNativeBreakpoint(DnModuleId module, uint token, uint offset, Func<NativeCodeBreakpointConditionContext, bool> cond) {
			DebugVerifyThread();
			var bp = new DnNativeCodeBreakpoint(module, token, offset, cond);
			nativeCodeBreakpointList.Add(module, bp);
			foreach (var dnMod in GetLoadedDnModules(module))
				bp.AddBreakpoint(dnMod);
			return bp;
		}
Ejemplo n.º 4
0
		internal DnCodeBreakpoint(DnModuleId module, uint token, uint offset) {
			Module = module;
			Token = token;
			Offset = offset;
			code = null;
		}
Ejemplo n.º 5
0
 public static ModuleId ToModuleId(this DnModuleId moduleId) =>
 new ModuleId(moduleId.AssemblyFullName, moduleId.ModuleName, moduleId.IsDynamic, moduleId.IsInMemory, moduleId.ModuleNameOnly);
Ejemplo n.º 6
0
		void SetILBreakpoint(DnModuleId moduleId, uint token) {
			Debug.Assert(token != 0 && breakpoint == null);
			DnBreakpoint bp = null;
			bp = debugger.CreateBreakpoint(moduleId, token, 0, ctx2 => {
				debugger.RemoveBreakpoint(bp);
				return true;
			});
		}