internal DnAppDomain(DnProcess ownerProcess, ICorDebugAppDomain appDomain, int incrementedId) { this.ownerProcess = ownerProcess; this.assemblies = new DebuggerCollection<ICorDebugAssembly, DnAssembly>(CreateAssembly); this.appDomain = new CorAppDomain(appDomain); this.incrementedId = incrementedId; NameChanged(); }
internal DnThread(DnProcess ownerProcess, ICorDebugThread thread, int uniqueId, int uniqueIdProcess) { this.Process = ownerProcess; this.CorThread = new CorThread(thread); this.UniqueId = uniqueId; this.UniqueIdProcess = uniqueIdProcess; }
internal DnThread(DnProcess ownerProcess, ICorDebugThread thread, int uniqueId, int uniqueIdProcess) { Process = ownerProcess; CorThread = new CorThread(thread); UniqueId = uniqueId; UniqueIdProcess = uniqueIdProcess; }
internal DnAppDomain(DnProcess ownerProcess, ICorDebugAppDomain appDomain, int uniqueId, int uniqueIdProcess) { Process = ownerProcess; assemblies = new DebuggerCollection<ICorDebugAssembly, DnAssembly>(CreateAssembly); CorAppDomain = new CorAppDomain(appDomain); UniqueId = uniqueId; UniqueIdProcess = uniqueIdProcess; NameChanged(); }
public DebuggerState(DebugCallbackEventArgs e, DnProcess process, DnAppDomain appDomain, DnThread thread) { this.EventArgs = e; this.StopStates = null; this.Process = process; this.AppDomain = appDomain; this.Thread = thread; }
public DebuggerState(DebugCallbackEventArgs e, DnProcess process, DnAppDomain appDomain, DnThread thread) { EventArgs = e; PauseStates = null; Process = process; AppDomain = appDomain; Thread = thread; }
internal DnAppDomain(DnProcess ownerProcess, ICorDebugAppDomain appDomain, int incrementedId) { this.ownerProcess = ownerProcess; this.assemblies = new DebuggerCollection <ICorDebugAssembly, DnAssembly>(CreateAssembly); this.appDomain = new CorAppDomain(appDomain); this.incrementedId = incrementedId; NameChanged(); }
public DebuggerState(DebugCallbackEventArgs e, DnProcess process, DnAppDomain appDomain, DnThread thread) { this.EventArgs = e; this.PauseStates = null; this.Process = process; this.AppDomain = appDomain; this.Thread = thread; }
MemoryModuleDefFile(SimpleProcessReader simpleProcessReader, DnProcess process, ulong address, byte[] data, bool isInMemory, ModuleDef module, bool loadSyms, bool autoUpdateMemory) : base(module, loadSyms) { this.simpleProcessReader = simpleProcessReader; Process = process; Address = address; this.data = data; this.isInMemory = isInMemory; AutoUpdateMemory = autoUpdateMemory; }
internal DnAppDomain(DnProcess ownerProcess, ICorDebugAppDomain appDomain, int uniqueId, int uniqueIdProcess) { Process = ownerProcess; assemblies = new DebuggerCollection <ICorDebugAssembly, DnAssembly>(CreateAssembly); CorAppDomain = new CorAppDomain(appDomain); UniqueId = uniqueId; UniqueIdProcess = uniqueIdProcess; NameChanged(); }
public ValueContext(ILocalsOwner localsOwner, CorFrame frame, DnThread thread) { this.LocalsOwner = localsOwner; this.Thread = thread; this.Process = thread.Process; // Read everything immediately since the frame will be neutered when Continue() is called this.FrameCouldBeNeutered = frame; frame.GetTypeAndMethodGenericParameters(out genericTypeArguments, out genericMethodArguments); this.Function = frame.Function; }
public ValueContext(ILocalsOwner localsOwner, CorFrame frame, DnThread thread, IList<CorType> genericTypeArguments) { this.LocalsOwner = localsOwner; this.Thread = thread; this.Process = thread.Process; // Read everything immediately since the frame will be neutered when Continue() is called this.FrameCouldBeNeutered = frame; this.genericTypeArguments = genericTypeArguments; this.genericMethodArguments = new CorType[0]; this.Function = frame == null ? null : frame.Function; }
public ValueContext(ILocalsOwner localsOwner, CorFrame frame, DnThread thread, DnProcess process) { this.LocalsOwner = localsOwner; this.Thread = thread; this.Process = process; Debug.Assert(thread == null || thread.Process == process); // Read everything immediately since the frame will be neutered when Continue() is called this.FrameCouldBeNeutered = frame; if (frame == null) { genericTypeArguments = genericMethodArguments = new List<CorType>(); this.Function = null; } else { frame.GetTypeAndMethodGenericParameters(out genericTypeArguments, out genericMethodArguments); this.Function = frame.Function; } }
public CorProcessReader(DnProcess process) : this(process.CorProcess) { }
internal DnThread(DnProcess ownerProcess, ICorDebugThread thread, int uniqueId, int uniqueIdProcess) { this.ownerProcess = ownerProcess; this.thread = new CorThread(thread); this.uniqueId = uniqueId; this.uniqueIdProcess = uniqueIdProcess; }
public static void ReadMemory(DnProcess process, ulong address, byte[] data, long index, int count) { ReadMemory(process.CorProcess.Handle, address, data, index, count); }
string GetProcessFullPath(DnProcess process) { if (process == null) return "???"; var name = process.Filename; if (string.IsNullOrEmpty(name)) return string.Format("0x{0:X}", process.ProcessId); return name; }
public DnProcessHexStream(DnProcess process) { this.process = process; }
public CallStackFrameVM(ICallStackFrameContext context, int index, CorFrame frame, DnProcess process) { this.context = context; this.index = index; this.frame = frame; this.process = process; }
internal DnThread(DnProcess ownerProcess, ICorDebugThread thread, int incrementedId) { this.ownerProcess = ownerProcess; this.thread = new CorThread(thread); this.incrementedId = incrementedId; }
public MyKey(DnProcess process, ulong address) { this.process = process; this.address = address; }
string GetProcessNameWithPID(DnProcess process) => string.Format("[0x{0:X}] {1}", process?.ProcessId ?? -1, GetProcessName(process));
public ValueContext(ILocalsOwner localsOwner, CorFrame frame, DnThread thread, List<CorType> genericTypeArguments) { LocalsOwner = localsOwner; Thread = thread; Process = thread.Process; // Read everything immediately since the frame will be neutered when Continue() is called FrameCouldBeNeutered = frame; this.genericTypeArguments = genericTypeArguments; genericMethodArguments = new List<CorType>(); Function = frame?.Function; }
public static IDsDocumentNameKey CreateKey(DnProcess process, ulong address) => new MyKey(process, address);
public void SetFrame(CorFrame frame, DnProcess process) { this.frame = frame; this.process = process; if (cachedOutput == null || !HasPropertyChangedHandlers) { cachedOutput = null; OnPropertyChanged("NameObject"); } else { var newCachedOutput = CachedOutput.Create(frame, Context.TypePrinterFlags); if (newCachedOutput.Equals(cachedOutput.Value)) return; cachedOutput = newCachedOutput; OnPropertyChanged("NameObject"); } }
void OnProcessTerminated(DnProcess process) { if (process == null) return; foreach (var appDomain in process.AppDomains) { OnAppDomainUnloaded(appDomain); process.AppDomainExited(appDomain.CorAppDomain.RawObject); } }
MemoryModuleDefFile(DnProcess process, ulong address, byte[] data, bool isInMemory, ModuleDef module, bool loadSyms, bool autoUpdateMemory) : base(module, loadSyms) { this.process = process; this.address = address; this.data = data; this.isInMemory = isInMemory; this.autoUpdateMemory = autoUpdateMemory; }
public DebugState(DnDebugger dbg) { this.dbg = dbg; Debug.Assert(dbg.Processes.Length == 1); debuggedProcess = dbg.Processes.FirstOrDefault(); if (debuggedProcess != null) { const uint PROCESS_QUERY_LIMITED_INFORMATION = 0x1000; hProcess_debuggee = NativeMethods.OpenProcess2(PROCESS_QUERY_LIMITED_INFORMATION, false, (uint)debuggedProcess.ProcessId); Debug.Assert(hProcess_debuggee != IntPtr.Zero, string.Format("OpenProcess() failed: 0x{0:X8}", Marshal.GetLastWin32Error())); } }
public abstract CorDebugJITCompilerFlags GetDesiredNGENCompilerFlags(DnProcess process);
public static IDnSpyFilenameKey CreateKey(DnProcess process, ulong address) { return new MyKey(process, address); }
void InitializeCurrentDebuggerState(DebugCallbackEventArgs e, DnProcess process) { if (process == null) { SetDefaultCurrentProcess(e); return; } AddDebuggerState(new DebuggerState(e, process, null, null)); }
void ProcessStopped(DnProcess process, bool addStopState) { this.managedCallbackCounter++; if (!addStopState) return; DnThread thread = process.GetMainThread(); DnAppDomain appDomain = thread == null ? process.GetMainAppDomain() : thread.AppDomainOrNull; AddDebuggerState(new DebuggerState(null, process, appDomain, thread) { StopStates = new DebuggerStopState[] { new DebuggerStopState(DebuggerStopReason.UserBreak), } }); CallOnProcessStateChanged(); }