public CallStackFrameVM(ICallStackFrameContext context, int index, CorFrame frame, DnProcess process) { this.context = context; this.index = index; this.frame = frame; this.process = process; }
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; }
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; }
MemoryModuleDefFile(Dictionary <ModuleDef, MemoryModuleDefFile> dict, DnProcess process, ulong address, byte[] data, bool isInMemory, ModuleDef module, bool loadSyms, bool autoUpdateMemory) : base(module, loadSyms) { this.dict = dict; 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); this.debuggedProcess = dbg.Processes[0]; const uint PROCESS_QUERY_LIMITED_INFORMATION = 0x1000; this.hProcess_debuggee = NativeMethods.OpenProcess2(PROCESS_QUERY_LIMITED_INFORMATION, false, (uint)this.debuggedProcess.ProcessId); Debug.Assert(this.hProcess_debuggee != IntPtr.Zero, string.Format("OpenProcess() failed: 0x{0:X8}", Marshal.GetLastWin32Error())); }
public ValueContext(ILocalsOwner localsOwner, CorFrame frame, DnThread thread, List <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 List <CorType>(); this.Function = frame?.Function; }
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 static T Write <T>(this T output, DnProcess p, bool useHex) where T : ITextOutput { output.Write('[', TextTokenType.Operator); if (useHex) { output.Write(string.Format("0x{0:X}", p.ProcessId), TextTokenType.Number); } else { output.Write(string.Format("{0}", p.ProcessId), TextTokenType.Number); } output.Write(']', TextTokenType.Operator); output.WriteSpace(); output.WriteFilename(GetFilename(p.Filename)); return(output); }
public static T Write <T>(this T output, DnProcess p, bool useHex) where T : ITextColorWriter { output.Write(BoxedTextColor.Punctuation, "["); if (useHex) { output.Write(BoxedTextColor.Number, string.Format("0x{0:X}", p.ProcessId)); } else { output.Write(BoxedTextColor.Number, string.Format("{0}", p.ProcessId)); } output.Write(BoxedTextColor.Punctuation, "]"); output.WriteSpace(); output.WriteFilename(GetFilename(p.Filename)); return(output); }
public static T Write <T>(this T output, DnProcess p, bool useHex) where T : ISyntaxHighlightOutput { output.Write("[", TextTokenKind.Operator); if (useHex) { output.Write(string.Format("0x{0:X}", p.ProcessId), TextTokenKind.Number); } else { output.Write(string.Format("{0}", p.ProcessId), TextTokenKind.Number); } output.Write("]", TextTokenKind.Operator); output.WriteSpace(); output.WriteFilename(GetFilename(p.Filename)); return(output); }
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 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"); } }
public static IDnSpyFilenameKey CreateKey(DnProcess process, ulong address) => new MyKey(process, address);
public MyKey(DnProcess process, ulong address) { this.process = process; this.address = address; }
string GetProcessNameWithPID(DnProcess process) => string.Format("[0x{0:X}] {1}", process?.ProcessId, GetProcessName(process));
public static IDnSpyFilenameKey CreateKey(DnProcess process, ulong address) { return(new MyKey(process, address)); }
public override CorDebugJITCompilerFlags GetDesiredNGENCompilerFlags(DnProcess process) => suppressJITOptimization_SystemModules ? CorDebugJITCompilerFlags.CORDEBUG_JIT_DISABLE_OPTIMIZATION : CorDebugJITCompilerFlags.CORDEBUG_JIT_DEFAULT;
public static void ReadMemory(DnProcess process, ulong address, byte[] data, long index, int count) { ReadMemory(process.CorProcess.Handle, address, data, index, count); }
public FrameInfo(ILocalsOwner localsOwner, DnThread thread, DnProcess process, CorFrame frame, int frameNo) { this.ValueContext = new ValueContext(localsOwner, frame, thread, process); }
public static IDsDocumentNameKey CreateKey(DnProcess process, ulong address) => new MyKey(process, address);