當前位置: 首頁>>代碼示例>>C#>>正文


C# ThreadMirror.GetFrames方法代碼示例

本文整理匯總了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];
		}
開發者ID:kmarecki,項目名稱:monodevelop,代碼行數:10,代碼來源:SoftDebuggerBacktrace.cs

示例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;
			}
		}
開發者ID:trustme,項目名稱:monodevelop,代碼行數:16,代碼來源:SoftDebuggerSession.cs

示例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();
            }
        }
開發者ID:andyhebear,項目名稱:Continuum,代碼行數:23,代碼來源:TraceRoots.cs


注:本文中的Mono.Debugger.Soft.ThreadMirror.GetFrames方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。