本文整理匯總了C#中Mono.Debugger.Soft.ThreadMirror.GetFrames方法的典型用法代碼示例。如果您正苦於以下問題:C# ThreadMirror.GetFrames方法的具體用法?C# ThreadMirror.GetFrames怎麽用?C# ThreadMirror.GetFrames使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Mono.Debugger.Soft.ThreadMirror
的用法示例。
在下文中一共展示了ThreadMirror.GetFrames方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SoftDebuggerBacktrace
public SoftDebuggerBacktrace (SoftDebuggerSession session, MDB.ThreadMirror thread): base (session.Adaptor)
{
this.session = session;
this.thread = thread;
stackVersion = session.StackVersion;
if (thread != null)
this.frames = thread.GetFrames ();
else
this.frames = new MDB.StackFrame[0];
}
示例2: EvaluateExpression
string EvaluateExpression (ThreadMirror thread, string exp)
{
try {
MDB.StackFrame[] frames = thread.GetFrames ();
if (frames.Length == 0)
return string.Empty;
EvaluationOptions ops = Options.EvaluationOptions;
ops.AllowTargetInvoke = true;
SoftEvaluationContext ctx = new SoftEvaluationContext (this, frames[0], ops);
ValueReference val = ctx.Evaluator.Evaluate (ctx, exp);
return val.CreateObjectValue (false).Value;
} catch (Exception ex) {
OnDebuggerOutput (true, ex.ToString ());
return string.Empty;
}
}
示例3: DoWalkStackFrames
private void DoWalkStackFrames(ThreadMirror thread, Trace parent)
{
Mono.Debugger.Soft.StackFrame[] frames = thread.GetFrames();
for (int i = frames.Length - 1; i >= 0; --i) // go backwards so that the frames at the top of the stack appear first
{
var frame = frames[i];
string name;
if (string.IsNullOrEmpty(frame.FileName))
name = string.Format("method {0}.{1}", frame.Method.DeclaringType.FullName, frame.Method.Name);
else
name = string.Format("method {0}.{1} [{2}:{3}]", frame.Method.DeclaringType.FullName, frame.Method.Name, frame.FileName, frame.LineNumber);
Log.WriteLine(TraceLevel.Info, "TraceRoots", name);
Log.Indent();
var child = new Trace(name, string.Empty, frame);
DoWalkStackFrame(frame, child);
if (child.Children.Count > 0)
parent.Children.Add(child);
Log.Unindent();
}
}