本文整理汇总了C#中ICorDebugProcess类的典型用法代码示例。如果您正苦于以下问题:C# ICorDebugProcess类的具体用法?C# ICorDebugProcess怎么用?C# ICorDebugProcess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ICorDebugProcess类属于命名空间,在下文中一共展示了ICorDebugProcess类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetProcessCallbackInterface
public ManagedCallback GetProcessCallbackInterface(string name, ICorDebugProcess pProcess)
{
Process process;
// We have to wait until the created process is added into the collection
lock(debugger.ProcessIsBeingCreatedLock) {
process = debugger.GetProcess(pProcess);
}
// Make *really* sure the process is not dead
if (process == null) {
debugger.TraceMessage("Ignoring callback \"" + name + "\": Process not found");
return null;
}
if (process.HasExited) {
debugger.TraceMessage("Ignoring callback \"" + name + "\": Process has exited");
return null;
}
if (process.TerminateCommandIssued && !(name == "ExitProcess")) {
debugger.TraceMessage("Ignoring callback \"" + name + "\": Terminate command was issued for the process");
return null;
}
// Check that the process is not exited
try {
int isRunning = process.CorProcess.IsRunning();
} catch (COMException e) {
process.TraceMessage("Ignoring callback \"" + name + "\": " + e.Message);
return null;
}
return process.CallbackInterface;
}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:29,代码来源:ManagedCallbackSwitch.cs
示例2: EnterCallback
void EnterCallback(PausedReason pausedReason, string name, ICorDebugProcess pProcess)
{
isInCallback = true;
process.TraceMessage("Callback: " + name);
System.Diagnostics.Debug.Assert(process.CorProcess == pProcess);
// After break is pressed we may receive some messages that were already queued
if (process.IsPaused && process.PauseSession.PausedReason == PausedReason.ForcedBreak) {
// TODO: This does not work well if exception if being processed and the user continues it
process.TraceMessage("Processing post-break callback");
// This compensates for the break call and we are in normal callback handling mode
process.AsyncContinue(DebuggeeStateAction.Keep, new Thread[] {}, null);
// Start of call back - create new pause session (as usual)
process.NotifyPaused(pausedReason);
// Make sure we stay pause after the callback is handled
pauseOnNextExit = true;
return;
}
if (process.IsRunning) {
process.NotifyPaused(pausedReason);
return;
}
throw new DebuggerException("Invalid state at the start of callback");
}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:27,代码来源:ManagedCallback.cs
示例3: DebugProcess
internal DebugProcess(DebugContext context, ICorDebugProcess process)
{
this.context = context;
this.process = process;
this.Process = Process.GetProcessById(process.GetID());
}
开发者ID:krabicezpapundeklu,项目名称:SharpDiag,代码行数:7,代码来源:DebugProcess.cs
示例4: EnterCallback
void EnterCallback(string name, ICorDebugProcess pProcess)
{
isInCallback = true;
process.TraceMessage("Callback: " + name);
System.Diagnostics.Debug.Assert(process.CorProcess == pProcess);
// After break is pressed we may receive some messages that were already queued
if (process.IsPaused) {
process.TraceMessage("Processing post-break callback");
// Decrese the "break count" from 2 to 1 - does not actually continue
// TODO: This inccorectly marks the debugger as running
process.AsyncContinue(DebuggeeStateAction.Keep);
// Make sure we stay paused after the callback is handled
pauseOnNextExit = true;
return;
}
if (process.IsRunning) {
process.NotifyPaused();
return;
}
throw new DebuggerException("Invalid state at the start of callback");
}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:25,代码来源:ManagedCallback.cs
示例5: Detach
public void Detach(ICorDebugProcess process)
{
if (this.runningProcesses.Remove(process))
{
process.Stop(Constants.Infinite);
process.Detach();
}
}
开发者ID:krabicezpapundeklu,项目名称:SharpDiag,代码行数:8,代码来源:DebugContext.cs
示例6: DnProcess
internal DnProcess(DnDebugger ownerDebugger, ICorDebugProcess process, int incrementedId)
{
this.ownerDebugger = ownerDebugger;
this.appDomains = new DebuggerCollection<ICorDebugAppDomain, DnAppDomain>(CreateAppDomain);
this.threads = new DebuggerCollection<ICorDebugThread, DnThread>(CreateThread);
this.process = new CorProcess(process);
this.incrementedId = incrementedId;
}
开发者ID:kenwilcox,项目名称:dnSpy,代码行数:8,代码来源:DnProcess.cs
示例7: GetProcess
internal Process GetProcess(ICorDebugProcess corProcess) {
foreach (Process process in this.Processes) {
if (process.CorProcess == corProcess) {
return process;
}
}
return null;
}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:8,代码来源:NDebugger.cs
示例8: CreateAppDomain
public void CreateAppDomain(ICorDebugProcess pProcess, ICorDebugAppDomain pAppDomain)
{
var domain = new DebugDomain(null, pAppDomain);
Logger.WriteLine("App domain {0} created", domain.Name);
pAppDomain.Attach();
pProcess.Continue(0);
}
开发者ID:anvaka,项目名称:slinject,代码行数:9,代码来源:ManagedCallback.cs
示例9: MoveNext
//
// IEnumerator interface
//
public bool MoveNext()
{
ICorDebugProcess[] a = new ICorDebugProcess[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_proc = CorProcess.GetCorProcess(a[0]);
else
m_proc = null;
return m_proc != null;
}
开发者ID:uQr,项目名称:Visual-NHibernate,代码行数:14,代码来源:ProcessEnumerator.cs
示例10: GetCorProcess
public static CorProcess GetCorProcess(ICorDebugProcess process)
{
Debug.Assert(process != null);
lock (m_instances)
{
if (!m_instances.Contains(process))
{
CorProcess p = new CorProcess(process);
m_instances.Add(process, p);
return p;
}
return (CorProcess)m_instances[process];
}
}
开发者ID:modulexcite,项目名称:Microsoft.Samples.Debugging,代码行数:14,代码来源:Process.cs
示例11: Process
internal Process(NDebugger debugger, ICorDebugProcess corProcess, string workingDirectory)
{
this.debugger = debugger;
this.corProcess = corProcess;
this.workingDirectory = workingDirectory;
this.callbackInterface = new ManagedCallback(this);
activeEvals = new EvalCollection(debugger);
modules = new ModuleCollection(debugger);
modules.Added += OnModulesAdded;
threads = new ThreadCollection(debugger);
appDomains = new AppDomainCollection(debugger);
}
开发者ID:BahNahNah,项目名称:dnSpy,代码行数:14,代码来源:Process.cs
示例12: foreach
int ICorDebug.GetProcess(uint dwProcessId, out ICorDebugProcess ppProcess)
{
ppProcess = null;
foreach (CorDebugProcess process in m_processes)
{
uint id = process.PhysicalProcessId.dwProcessId;
if (dwProcessId == id)
{
ppProcess = process;
break;
}
}
return Utility.COM_HResults.BOOL_TO_HRESULT_FAIL( ppProcess != null ); /*better failure?*/
}
开发者ID:aura1213,项目名称:netmf-interpreter,代码行数:17,代码来源:CorDebug.cs
示例13: CorAppDomainEventArgs
void ICorDebugManagedCallback.ExitAppDomain(
ICorDebugProcess process,
ICorDebugAppDomain appDomain)
{
HandleEvent(ManagedCallbackType.OnAppDomainExit,
new CorAppDomainEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
appDomain == null ? null : new CorAppDomain(appDomain),
ManagedCallbackType.OnAppDomainExit));
}
开发者ID:fedorw,项目名称:monodevelop,代码行数:9,代码来源:Debugger.cs
示例14: CorProcessEventArgs
void ICorDebugManagedCallback.ControlCTrap(ICorDebugProcess process)
{
HandleEvent(ManagedCallbackType.OnControlCTrap,
new CorProcessEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
ManagedCallbackType.OnControlCTrap));
}
开发者ID:fedorw,项目名称:monodevelop,代码行数:6,代码来源:Debugger.cs
示例15: CorDebuggerErrorEventArgs
void ICorDebugManagedCallback.DebuggerError(
ICorDebugProcess process,
int errorHR,
uint errorCode)
{
HandleEvent(ManagedCallbackType.OnDebuggerError,
new CorDebuggerErrorEventArgs( process == null ? null : CorProcess.GetCorProcess(process),
errorHR,
(int)errorCode,
ManagedCallbackType.OnDebuggerError));
}
开发者ID:fedorw,项目名称:monodevelop,代码行数:11,代码来源:Debugger.cs
示例16:
void ICorDebugManagedCallback2.ChangeConnection(ICorDebugProcess process, uint connectionId)
{
Debug.Assert(false);
}
开发者ID:Orvid,项目名称:Cosmos,代码行数:4,代码来源:Debugger.cs
示例17: ChangeConnection
public void ChangeConnection(ICorDebugProcess pProcess, uint dwConnectionId)
{
EnterCallback("ChangeConnection", pProcess);
ExitCallback();
}
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:6,代码来源:ManagedCallback.cs
示例18: CorProcess
private CorProcess(ICorDebugProcess process)
: base(process)
{
}
开发者ID:modulexcite,项目名称:Microsoft.Samples.Debugging,代码行数:4,代码来源:Process.cs
示例19: TryGetValidAppDomain
public DnAppDomain TryGetValidAppDomain(ICorDebugProcess comProcess, ICorDebugAppDomain comAppDomain)
{
DebugVerifyThread();
var process = TryGetValidProcess(comProcess);
if (process == null)
return null;
return process.TryGetValidAppDomain(comAppDomain);
}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:8,代码来源:DnDebugger.cs
示例20: TryGetValidProcess
/// <summary>
/// Gets a process or null if it has exited
/// </summary>
/// <param name="comProcess">Process</param>
/// <returns></returns>
public DnProcess TryGetValidProcess(ICorDebugProcess comProcess)
{
DebugVerifyThread();
var process = processes.TryGet(comProcess);
if (process == null)
return null;
if (!process.CheckValid())
return null;
return process;
}
开发者ID:lovebanyi,项目名称:dnSpy,代码行数:15,代码来源:DnDebugger.cs
注:本文中的ICorDebugProcess类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论