本文整理汇总了C#中Microsoft.Samples.Debugging.CorDebug.CorThread类的典型用法代码示例。如果您正苦于以下问题:C# CorThread类的具体用法?C# CorThread怎么用?C# CorThread使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CorThread类属于Microsoft.Samples.Debugging.CorDebug命名空间,在下文中一共展示了CorThread类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HasQueuedCallbacks
/**
* Are there managed callbacks queued up for the requested thread?
*/
public bool HasQueuedCallbacks (CorThread managedThread)
{
int queued = 0;
m_controller.HasQueuedCallbacks( (managedThread==null)?null:managedThread.GetInterface(),
out queued
);
return !(queued == 0);
}
示例2: CorBacktrace
public CorBacktrace (CorThread thread, CorDebuggerSession session): base (session.ObjectAdapter)
{
this.session = session;
this.thread = thread;
threadId = thread.Id;
frames = new List<CorFrame> (GetFrames (thread));
evalTimestamp = CorDebuggerSession.EvaluationTimestamp;
}
示例3: GetFrames
internal static IEnumerable<CorFrame> GetFrames (CorThread thread)
{
foreach (CorChain chain in thread.Chains) {
if (!chain.IsManaged)
continue;
foreach (CorFrame frame in chain.Frames)
yield return frame;
}
}
示例4: Step
public void Step(CorThread thread)
{
_activeThread = thread;
var stepper = createStepper();
var mod = _activeThread.ActiveFrame.Function.Module;
if (hasSymbolReader(mod))
stepIn(mod, stepper);
else
stepOut(stepper);
}
示例5: MoveNext
//
// IEnumerator interface
//
public bool MoveNext()
{
ICorDebugThread[] a = new ICorDebugThread[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_th = new CorThread (a[0]);
else
m_th = null;
return m_th != null;
}
示例6: ThreadInfo
//constructors
/// <summary>
/// Initialze the StackTrace Class and create all the FrameInfo objects
/// </summary>
/// <param name="proc">The thread to get the stack trace of</param>
internal ThreadInfo(CorThread thread, ProcessInfo procInfo)
{
if (thread == null)
{
throw new ArgumentNullException("thread");
}
if (procInfo == null)
{
throw new ArgumentNullException("procInfo");
}
this.thread = thread;
metaImportHash = new Dictionary<string, CorMetadataImport>();
frameStack = new List<FrameInfo>();
threadId = thread.Id;
processInfo = procInfo;
//get the general thread information object
generalThreadInfo = procInfo.GeneralThreads[threadId];
}
示例7: Stopped
public void Stopped(DllDebugger debugger, CorThread thread)
{
Console.ForegroundColor = ConsoleColor.Black;
Console.BackgroundColor = ConsoleColor.Green;
Console.Out.Write("Thread [{0}]", thread.Id);
Console.BackgroundColor = ConsoleColor.Black;
Console.ForegroundColor = ConsoleColor.Red;
Console.Out.Write(" (ct=Continue, stov=Step Over, stin=Step In, trc=Stack Trace, det=Detach): ");
Console.ForegroundColor = ConsoleColor.Green;
var line = Console.In.ReadLine();
var transcribed = line.ToLower();
if (transcribed.Contains("ct")) return;
if (transcribed.Contains("stov")) debugger.StepOver(thread);
else if (transcribed.Contains("stin")) debugger.StepInto(thread);
else if (transcribed.Contains("trc")) debugger.ShowStackTrace(thread);
else if (transcribed.Contains("locals")) debugger.ShowLocals(thread);
else if (transcribed.Contains("br")) SetBreakpoint(transcribed, debugger);
else if (transcribed.Contains("det")) debugger.Detach();
else Stopped(debugger, thread);
}
示例8: CorStepCompleteEventArgs
public CorStepCompleteEventArgs(CorAppDomain appDomain, CorThread thread,
CorStepper stepper, CorDebugStepReason stepReason)
: base(appDomain, thread)
{
m_stepper = stepper;
m_stepReason = stepReason;
}
示例9: CorBreakpointEventArgs
public CorBreakpointEventArgs(CorAppDomain appDomain,
CorThread thread,
CorBreakpoint managedBreakpoint)
: base(appDomain, thread)
{
m_break = managedBreakpoint;
}
示例10: CorThreadEventArgs
public CorThreadEventArgs(CorAppDomain appDomain, CorThread thread)
: base(appDomain != null ? appDomain : thread.AppDomain)
{
Thread = thread;
}
示例11: CorExceptionUnwind2EventArgs
public CorExceptionUnwind2EventArgs(CorAppDomain appDomain, CorThread thread,
CorDebugExceptionUnwindCallbackType eventType,
int flags,
ManagedCallbackType callbackType)
: base(appDomain, thread, callbackType)
{
m_eventType = eventType;
m_flags = flags;
}
示例12: CorFunctionRemapCompleteEventArgs
public CorFunctionRemapCompleteEventArgs(CorAppDomain appDomain,
CorThread thread,
CorFunction managedFunction
)
: base(appDomain, thread)
{
m_managedFunction = managedFunction;
}
示例13: CorFunctionRemapOpportunityEventArgs
public CorFunctionRemapOpportunityEventArgs(CorAppDomain appDomain,
CorThread thread,
CorFunction oldFunction,
CorFunction newFunction,
int oldILoffset
)
: base(appDomain, thread)
{
m_oldFunction = oldFunction;
m_newFunction = newFunction;
m_oldILoffset = oldILoffset;
}
示例14: CorExceptionEventArgs
public CorExceptionEventArgs(CorAppDomain appDomain,
CorThread thread,
bool unhandled,
ManagedCallbackType callbackType)
: base(appDomain, thread, callbackType)
{
m_unhandled = unhandled;
}
示例15: CorBreakpointSetErrorEventArgs
public CorBreakpointSetErrorEventArgs(CorAppDomain appDomain,
CorThread thread,
CorBreakpoint breakpoint,
int errorCode)
: base(appDomain, thread)
{
m_breakpoint = breakpoint;
m_errorCode = errorCode;
}