• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Client.BreakEventInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Mono.Debugging.Client.BreakEventInfo的典型用法代码示例。如果您正苦于以下问题:C# BreakEventInfo类的具体用法?C# BreakEventInfo怎么用?C# BreakEventInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



BreakEventInfo类属于Mono.Debugging.Client命名空间,在下文中一共展示了BreakEventInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnEnableBreakEvent

		protected override void OnEnableBreakEvent (BreakEventInfo eventInfo, bool enable)
		{
			throw new NotImplementedException ();
		}
开发者ID:lukaszunity,项目名称:MonoDevelop.UnityDebug,代码行数:4,代码来源:UnitySoftDebuggerSession.cs


示例2: OnEnableBreakEvent

		/// <summary>
		/// Called when a break event is enabled or disabled
		/// </summary>
		/// <param name='eventInfo'>
		/// The break event
		/// </param>
		/// <param name='enable'>
		/// The new status
		/// </param>
		protected abstract void OnEnableBreakEvent (BreakEventInfo eventInfo, bool enable);
开发者ID:kmarecki,项目名称:monodevelop,代码行数:10,代码来源:DebuggerSession.cs


示例3: OnEnableBreakEvent

		protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable)
		{
			if (exited)
				return;
			
			var bi = (BreakInfo) binfo;
			if (bi.Requests.Count != 0) {
				foreach (var request in bi.Requests)
					request.Enabled = enable;
				
				if (!enable)
					RemoveQueuedBreakEvents (bi.Requests);
			}
		}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:14,代码来源:SoftDebuggerSession.cs


示例4: OnEnableBreakEvent

		protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable)
		{
			if (exited)
				return;
			BreakInfo bi = (BreakInfo) binfo;
			if (bi.Req != null) {
				bi.Req.Enabled = enable;
				if (!enable)
					RemoveQueuedBreakEvents (bi.Req);
			}
		}
开发者ID:famousthom,项目名称:monodevelop,代码行数:11,代码来源:SoftDebuggerSession.cs


示例5: OnRemoveBreakEvent

		/// <summary>
		/// Called when a breakpoint has been removed.
		/// </summary>
		/// <param name='eventInfo'>
		/// The breakpoint
		/// </param>
		/// <remarks>
		/// Implementations of this method should remove or disable the breakpoint
		/// in the debugging engine.
		/// </remarks>
		protected abstract void OnRemoveBreakEvent (BreakEventInfo eventInfo);
开发者ID:kmarecki,项目名称:monodevelop,代码行数:11,代码来源:DebuggerSession.cs


示例6: OnEnableBreakEvent

		protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable)
		{
			CorBreakpoint bp = binfo.Handle as CorFunctionBreakpoint;
			if (bp != null)
				bp.Activate (enable);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:6,代码来源:CorDebuggerSession.cs


示例7: OnRemoveBreakEvent

		protected override void OnRemoveBreakEvent (BreakEventInfo bi)
		{
			if (terminated)
				return;
			
			if (bi.Status != BreakEventStatus.Bound || bi.Handle == null)
				return;
			
			CorFunctionBreakpoint corBp = (CorFunctionBreakpoint)bi.Handle;
			corBp.Activate (false);
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:11,代码来源:CorDebuggerSession.cs


示例8: OnInsertBreakEvent

		protected override BreakEventInfo OnInsertBreakEvent (BreakEvent be)
		{
			Breakpoint bp = be as Breakpoint;
			if (bp == null)
				throw new NotSupportedException ();
			
			BreakEventInfo bi = new BreakEventInfo ();
			
			lock (gdbLock) {
				bool dres = InternalStop ();
				try {
					string extraCmd = string.Empty;
					if (bp.HitCount > 0) {
						extraCmd += "-i " + bp.HitCount;
						breakpointsWithHitCount.Add (bi);
					}
					if (!string.IsNullOrEmpty (bp.ConditionExpression)) {
						if (!bp.BreakIfConditionChanges)
							extraCmd += " -c " + bp.ConditionExpression;
					}
					
					GdbCommandResult res = null;
					string errorMsg = null;
					
					if (bp is FunctionBreakpoint) {
						try {
							res = RunCommand ("-break-insert", extraCmd.Trim (), ((FunctionBreakpoint) bp).FunctionName);
						} catch (Exception ex) {
							errorMsg = ex.Message;
						}
					} else {
						// Breakpoint locations must be double-quoted if files contain spaces.
						// For example: -break-insert "\"C:/Documents and Settings/foo.c\":17"
						RunCommand ("-environment-directory", Escape (Path.GetDirectoryName (bp.FileName)));
						
						try {
							res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (bp.FileName) + ":" + bp.Line));
						} catch (Exception ex) {
							errorMsg = ex.Message;
						}
						
						if (res == null) {
							try {
								res = RunCommand ("-break-insert", extraCmd.Trim (), Escape (Escape (Path.GetFileName (bp.FileName)) + ":" + bp.Line));
							}
							catch {
								// Ignore
							}
						}
					}
					
					if (res == null) {
						bi.SetStatus (BreakEventStatus.Invalid, errorMsg);
						return bi;
					}
					int bh = res.GetObject ("bkpt").GetInt ("number");
					if (!be.Enabled)
						RunCommand ("-break-disable", bh.ToString ());
					breakpoints [bh] = bi;
					bi.Handle = bh;
					bi.SetStatus (BreakEventStatus.Bound, null);
					return bi;
				} finally {
					InternalResume (dres);
				}
			}
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:67,代码来源:GdbSession.cs


示例9: NotifyBreakEventUpdate

		void NotifyBreakEventUpdate (BreakEventInfo binfo, int hitCount, string lastTrace)
		{
			bool notify = false;
			
			WaitCallback nc = delegate {
				if (hitCount != -1)
					binfo.UpdateHitCount (hitCount);
				if (lastTrace != null)
					binfo.UpdateLastTraceValue (lastTrace);
			};
			
			lock (breakUpdates)
			{
				int span = (int) (DateTime.Now - lastBreakEventUpdate).TotalMilliseconds;
				if (span >= BreakEventUpdateNotifyDelay && !breakUpdateEventsQueued) {
					// Last update was more than 0.5s ago. The update can be sent.
					lastBreakEventUpdate = DateTime.Now;
					notify = true;
				} else {
					// Queue the event notifications to avoid wasting too much time
					breakUpdates [(int)binfo.Handle] = nc;
					if (!breakUpdateEventsQueued) {
						breakUpdateEventsQueued = true;
						
						ThreadPool.QueueUserWorkItem (delegate {
							Thread.Sleep (BreakEventUpdateNotifyDelay - span);
							List<WaitCallback> copy;
							lock (breakUpdates) {
								copy = new List<WaitCallback> (breakUpdates.Values);
								breakUpdates.Clear ();
								breakUpdateEventsQueued = false;
								lastBreakEventUpdate = DateTime.Now;
							}
							foreach (WaitCallback wc in copy)
								wc (null);
						});
					}
				}
			}
			if (notify)
				nc (null);
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:42,代码来源:GdbSession.cs


示例10: OnRemoveBreakEvent

        protected override void OnRemoveBreakEvent(BreakEventInfo binfo)
        {
            if (binfo == null)
                return;

            breakpointsWithHitCount.Remove (binfo);

            DebugEngineWrapper.BreakPoint breakpoint = 	breakpoints[(ulong)binfo.Handle].Breakpoint;

            if (IsDebugging /*&& bpw.IsExisting*/)
                Engine.RemoveBreakPoint(breakpoint);

            breakpointsWithHitCount.Remove (binfo);
            breakpoints.Remove((ulong)binfo.Handle);
        }
开发者ID:nazriel,项目名称:Mono-D,代码行数:15,代码来源:DDebugSession.cs


示例11: FireBreakPoint

        void FireBreakPoint(ulong offset)
        {
            TargetEventArgs args = new TargetEventArgs(TargetEventType.TargetHitBreakpoint);

                ulong tempoff = (ulong)offset;
                if (breakpoints.ContainsKey(tempoff))
                {
                    breakpoints[(ulong)tempoff].EventInfo.UpdateHitCount((int)breakpoints[(ulong)tempoff].Breakpoint.HitCount);
                    args.BreakEvent = breakpoints[(ulong)tempoff].EventInfo.BreakEvent;
                }
                else
                {
                    args = new TargetEventArgs(TargetEventType.TargetStopped);
                    BreakEventInfo breakInfo = new BreakEventInfo();
                    breakInfo.Handle = tempoff;
                    breakInfo.SetStatus (BreakEventStatus.Bound, null);
                    string fn;
                    uint ln;
                    if (Engine.Symbols.GetLineByOffset(offset, out fn, out ln))
                    {
                        //breakInfo.BreakEvent = new Breakpoint(fn, (int)ln);
                        args.BreakEvent = breakInfo.BreakEvent;
                    }
                }

                ProcessInfo process = OnGetProcesses()[0];
                args.Process = new ProcessInfo(process.Id, process.Name);

                args.Backtrace = new Backtrace(new DDebugBacktrace(this, activeThread, Engine));

                ThreadPool.QueueUserWorkItem(delegate(object data)
                {
                    try
                    {
                        OnTargetEvent((TargetEventArgs)data);
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex);
                    }
                }, args);
        }
开发者ID:nazriel,项目名称:Mono-D,代码行数:42,代码来源:DDebugSession.cs


示例12: OnInsertBreakEvent

        protected override BreakEventInfo OnInsertBreakEvent(BreakEvent be)
        {
            Breakpoint bp = be as Breakpoint;
            if (bp == null)
                throw new NotSupportedException ();

            BreakEventInfo breakEventInfo = new BreakEventInfo ();

            //bool dres = InternalStop ();
            try {
                string extraCmd = string.Empty;
                if (bp.HitCount > 0) {
                    extraCmd += "-i " + bp.HitCount;
                    breakpointsWithHitCount.Add (breakEventInfo);
                }
                if (!string.IsNullOrEmpty (bp.ConditionExpression)) {
                    if (!bp.BreakIfConditionChanges)
                        extraCmd += " -c " + bp.ConditionExpression;
                }

                ulong bh = 0;
                DebugEngineWrapper.BreakPoint engineBreakPoint = null;
                ulong off = 0;
                if (Engine.Symbols.GetOffsetByLine(bp.FileName, (uint)bp.Line, out off))
                {
                    engineBreakPoint = Engine.AddBreakPoint(BreakPointOptions.Enabled);
                    engineBreakPoint.Offset = off;

                    bh = engineBreakPoint.Offset;
                    breakpoints[bh] = new BreakPointWrapper(breakEventInfo, engineBreakPoint);
                    breakEventInfo.Handle = bh;
                    breakEventInfo.SetStatus(BreakEventStatus.Bound, null);

                    //if (!be.Enabled)
                    //ToDo: tell debugger engine that breakpoint is disabled

                }
                else
                {
                    breakEventInfo.SetStatus(BreakEventStatus.BindError, null);
                }

                return breakEventInfo;
            } finally {
                //InternalResume (dres);
            }
        }
开发者ID:nazriel,项目名称:Mono-D,代码行数:47,代码来源:DDebugSession.cs


示例13: BreakPointWrapper

 public BreakPointWrapper(BreakEventInfo eventInfo, DebugEngineWrapper.BreakPoint breakpoint)
 {
     EventInfo = eventInfo;
     Breakpoint = breakpoint;
 }
开发者ID:nazriel,项目名称:Mono-D,代码行数:5,代码来源:DDebugSession.cs


示例14: OnEnableBreakEvent

        protected override void OnEnableBreakEvent(BreakEventInfo binfo, bool enable)
        {
            if (binfo.Handle == null)
                return;

            breakpoints[(ulong)binfo.Handle].Breakpoint.Flags =  enable? BreakPointOptions.Enabled : BreakPointOptions.Deferred;

            //ToDo: tell engine we enabled a break point
        }
开发者ID:nazriel,项目名称:Mono-D,代码行数:9,代码来源:DDebugSession.cs


示例15: OnRemoveBreakEvent

 protected override void OnRemoveBreakEvent(BreakEventInfo binfo)
 {
     if(LogWriter != null)
         LogWriter(false, "Break removed " + binfo.ToString());
 }
开发者ID:profelis,项目名称:md-haxebinding,代码行数:5,代码来源:HxcppDbgSession.cs


示例16: OnRemoveBreakEvent

		protected override void OnRemoveBreakEvent (BreakEventInfo binfo)
		{
			lock (gdbLock) {
				if (binfo.Handle == null)
					return;
				bool dres = InternalStop ();
				breakpointsWithHitCount.Remove (binfo);
				breakpoints.Remove ((int)binfo.Handle);
				try {
					RunCommand ("-break-delete", binfo.Handle.ToString ());
				} finally {
					InternalResume (dres);
				}
			}
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:15,代码来源:GdbSession.cs


示例17: OnUpdateBreakEvent

 protected override void OnUpdateBreakEvent(BreakEventInfo binfo)
 {
     LogWriter(false, "Break updated " + binfo.ToString());
 }
开发者ID:profelis,项目名称:md-haxebinding,代码行数:4,代码来源:HxcppDbgSession.cs


示例18: OnEnableBreakEvent

		protected override void OnEnableBreakEvent (BreakEventInfo binfo, bool enable)
		{
			lock (gdbLock) {
				if (binfo.Handle == null)
					return;
				bool dres = InternalStop ();
				try {
					if (enable)
						RunCommand ("-break-enable", binfo.Handle.ToString ());
					else
						RunCommand ("-break-disable", binfo.Handle.ToString ());
				} finally {
					InternalResume (dres);
				}
			}
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:16,代码来源:GdbSession.cs


示例19: OnInsertBreakEvent

		protected override BreakEventInfo OnInsertBreakEvent (BreakEvent be)
		{
			BreakEventInfo binfo = new BreakEventInfo ();

			lock (documents) {
				Breakpoint bp = be as Breakpoint;
				if (bp != null) {
					if (bp is FunctionBreakpoint) {
						// FIXME: implement breaking on function name
						binfo.SetStatus (BreakEventStatus.Invalid, null);
						return binfo;
					} else {
						DocInfo doc;
						if (!documents.TryGetValue (System.IO.Path.GetFullPath (bp.FileName), out doc)) {
							binfo.SetStatus (BreakEventStatus.NotBound, null);
							return binfo;
						}
						
						int line;
						try {
							line = doc.Document.FindClosestLine(bp.Line);
						}
						catch {
							// Invalid line
							binfo.SetStatus (BreakEventStatus.Invalid, null);
							return binfo;
						}
						ISymbolMethod met = doc.Reader.GetMethodFromDocumentPosition (doc.Document, line, 0);
						if (met == null) {
							binfo.SetStatus (BreakEventStatus.Invalid, null);
							return binfo;
						}
						
						int offset = -1;
						foreach (SequencePoint sp in met.GetSequencePoints ()) {
							if (sp.Line == line && sp.Document.URL == doc.Document.URL) {
								offset = sp.Offset;
								break;
							}
						}
						if (offset == -1) {
							binfo.SetStatus (BreakEventStatus.Invalid, null);
							return binfo;
						}
						
						CorFunction func = doc.Module.GetFunctionFromToken (met.Token.GetToken ());
						CorFunctionBreakpoint corBp = func.ILCode.CreateBreakpoint (offset);
						corBp.Activate (bp.Enabled);
						breakpoints[corBp] = binfo;
						
						binfo.Handle = corBp;
						binfo.SetStatus (BreakEventStatus.Bound, null);
						return binfo;
					}
				}
			}
			return null;
		}
开发者ID:RainsSoft,项目名称:playscript-monodevelop,代码行数:58,代码来源:CorDebuggerSession.cs


示例20: OnUpdateBreakEvent

		protected override void OnUpdateBreakEvent (BreakEventInfo binfo)
		{
			Breakpoint bp = binfo.BreakEvent as Breakpoint;
			if (bp == null)
				throw new NotSupportedException ();

			if (binfo.Handle == null)
				return;
			
			bool ss = InternalStop ();
			
			try {
				if (bp.HitCount > 0) {
					RunCommand ("-break-after", binfo.Handle.ToString (), bp.HitCount.ToString ());
					breakpointsWithHitCount.Add (binfo);
				} else
					breakpointsWithHitCount.Remove (binfo);
				
				if (!string.IsNullOrEmpty (bp.ConditionExpression) && !bp.BreakIfConditionChanges)
					RunCommand ("-break-condition", binfo.Handle.ToString (), bp.ConditionExpression);
				else
					RunCommand ("-break-condition", binfo.Handle.ToString ());
			} finally {
				InternalResume (ss);
			}
		}
开发者ID:telebovich,项目名称:monodevelop,代码行数:26,代码来源:GdbSession.cs



注:本文中的Mono.Debugging.Client.BreakEventInfo类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Client.Breakpoint类代码示例发布时间:2022-05-26
下一篇:
C# Client.BreakEvent类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap