本文整理汇总了C#中Debugger.Process类的典型用法代码示例。如果您正苦于以下问题:C# Process类的具体用法?C# Process怎么用?C# Process使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Process类属于Debugger命名空间,在下文中一共展示了Process类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StackFrame
internal StackFrame(Thread thread, ICorDebugILFrame corILFrame, uint chainIndex, uint frameIndex)
{
this.process = thread.Process;
this.thread = thread;
this.appDomain = process.AppDomains[corILFrame.GetFunction().GetClass().GetModule().GetAssembly().GetAppDomain()];
this.corILFrame = corILFrame;
this.corILFramePauseSession = process.PauseSession;
this.corFunction = corILFrame.GetFunction();
this.chainIndex = chainIndex;
this.frameIndex = frameIndex;
MetaDataImport metaData = thread.Process.Modules[corFunction.GetClass().GetModule()].MetaData;
int methodGenArgs = metaData.EnumGenericParams(corFunction.GetToken()).Length;
// Class parameters are first, then the method ones
List<ICorDebugType> corGenArgs = ((ICorDebugILFrame2)corILFrame).EnumerateTypeParameters().ToList();
// Remove method parametrs at the end
corGenArgs.RemoveRange(corGenArgs.Count - methodGenArgs, methodGenArgs);
List<DebugType> genArgs = new List<DebugType>(corGenArgs.Count);
foreach(ICorDebugType corGenArg in corGenArgs) {
genArgs.Add(DebugType.CreateFromCorType(this.AppDomain, corGenArg));
}
DebugType debugType = DebugType.CreateFromCorClass(
this.AppDomain,
null,
corFunction.GetClass(),
genArgs.ToArray()
);
this.methodInfo = (DebugMethodInfo)debugType.GetMember(corFunction.GetToken());
}
示例2: Eval
Eval(Process process, string description, ICorDebugEval corEval)
{
this.process = process;
this.description = description;
this.corEval = corEval;
this.state = EvalState.Evaluating;
}
示例3: DebuggeeExceptionForm
DebuggeeExceptionForm(Process process, string exceptionType)
{
InitializeComponent();
this.Break = true;
this.process = process;
this.exceptionType = exceptionType;
this.process.Exited += ProcessHandler;
this.process.Resumed += ProcessHandler;
this.FormClosed += FormClosedHandler;
this.WindowState = DebuggingOptions.Instance.DebuggeeExceptionWindowState;
FormLocationHelper.Apply(this, "DebuggeeExceptionForm", true);
this.MinimizeBox = this.MaximizeBox = this.ShowIcon = false;
this.exceptionView.Font = WinFormsResourceService.DefaultMonospacedFont;
this.exceptionView.DoubleClick += ExceptionViewDoubleClick;
this.exceptionView.WordWrap = false;
this.btnBreak.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Break}");
this.btnStop.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Terminate}");
this.btnContinue.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Continue}");
this.btnBreak.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Break");
this.btnStop.Image = WinFormsResourceService.GetBitmap("Icons.16x16.StopProcess");
this.btnContinue.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Continue");
}
示例4: debugActiveProcess
private Process debugActiveProcess(uint handle, string filename)
{
InitDebugger(GetProgramVersion(filename));
Process p = new Process(this,this.CorDebug.DebugActiveProcess(handle,0));
AddProcess(p);
return p;
}
示例5: MessageEventArgs
public MessageEventArgs(Process process, int level, string message, string category)
: base(process)
{
this.level = level;
this.message = message;
this.category = category;
}
示例6: Evaluate
public static Value Evaluate(INode code, Process context)
{
if (context.SelectedStackFrame == null && context.SelectedThread.MostRecentStackFrame == null)
// This can happen when needed 'dll' is missing. This causes an exception dialog to be shown even before the applicaiton starts
throw new GetValueException("Can not evaluate because the process has no managed stack frames");
return Evaluate(code, context.GetCurrentExecutingFrame());
}
示例7: RemoveProcess
internal void RemoveProcess(Process process)
{
processCollection.Remove(process);
OnProcessExited(process);
if (processCollection.Count == 0) {
// Exit callback and then terminate the debugger
this.MTA2STA.AsyncCall( delegate { this.TerminateDebugger(); } );
}
}
示例8: Show
public static void Show(Process process, string title, string message, string stacktrace, Bitmap icon)
{
DebuggeeExceptionForm form = new DebuggeeExceptionForm(process);
form.Text = title;
form.pictureBox.Image = icon;
form.lblExceptionText.Text = message;
form.exceptionView.Text = stacktrace;
form.Show(WorkbenchSingleton.MainWin32Window);
}
示例9: DoEvents
/// <param name="process">Process on which to track debuggee state</param>
public static void DoEvents(Process process)
{
if (process == null) return;
DebuggeeState oldState = process.DebuggeeState;
WpfDoEvents();
DebuggeeState newState = process.DebuggeeState;
if (oldState != newState) {
//LoggingService.Info("Aborted because debuggee resumed");
throw new AbortedBecauseDebuggeeResumedException();
}
}
示例10: SelectProcess
protected override void SelectProcess(Process process)
{
if (debuggedProcess != null) {
debuggedProcess.Paused -= debuggedProcess_Paused;
}
debuggedProcess = process;
if (debuggedProcess != null) {
debuggedProcess.Paused += debuggedProcess_Paused;
}
RefreshPad();
}
示例11: Eval
Eval(Process process,
string description,
EvaluationInvoker evaluationInvoker)
{
this.process = process;
this.description = description;
this.evaluationInvoker = evaluationInvoker;
process.ScheduleEval(this);
process.Debugger.MTA2STA.AsyncCall(delegate { process.StartEvaluation(); });
}
示例12: EnCManager
public EnCManager(Process process)
{
resource = new ResourceManager(this, process);
resource.PreLoad();
process.Modules.Added += this.ProcessModuleAdded;
metadata = new MetaDataManager(this);
eventCreator = new EditorEventCreator(this);
process.EnCHook = this;
this.process = process;
LocalVarDiff.ClearLocalVarCache();
}
示例13: TargetVM
/// <summary>
/// Create a new target VM for the giveb process id.
/// </summary>
/// <param name="pid">Process ID of the IKVM</param>
internal TargetVM(int pid)
{
debugger = new NDebugger();
System.Diagnostics.Process sysProcess = System.Diagnostics.Process.GetProcessById(pid);
process = debugger.Attach(sysProcess);
process.Exited += new EventHandler(ProcessExited);
process.ModuleLoaded += new EventHandler<ModuleEventArgs>(ModuleLoaded);
process.Paused += new EventHandler<ProcessEventArgs>(Paused);
process.Resumed += new EventHandler<ProcessEventArgs>(Resumed);
}
示例14: DebuggerProcessAssemblyList
public DebuggerProcessAssemblyList(Debugger.Process process)
{
if (process == null)
throw new ArgumentNullException("process");
this.process = process;
this.moduleModels = new NullSafeSimpleModelCollection<DebuggerModuleModel>();
this.moduleModels.AddRange(this.process.Modules.Select(m => new DebuggerModuleModel(m)));
this.Assemblies = new NullSafeSimpleModelCollection<IAssemblyModel>();
this.Assemblies.AddRange(moduleModels.Select(mm => mm.AssemblyModel));
this.process.ModuleLoaded += ModuleLoaded;
this.process.ModuleUnloaded += ModuleUnloaded;
}
示例15: SelectProcess
protected override void SelectProcess(Process process)
{
if (debuggedProcess != null) {
debuggedProcess.Modules.Added -= debuggedProcess_ModuleLoaded;
debuggedProcess.Modules.Removed -= debuggedProcess_ModuleUnloaded;
}
debuggedProcess = process;
if (debuggedProcess != null) {
debuggedProcess.Modules.Added += debuggedProcess_ModuleLoaded;
debuggedProcess.Modules.Removed += debuggedProcess_ModuleUnloaded;
}
RefreshPad();
}