private void OnBreakpoint(object sender, IDebugBreakpoint e) { var breakpoint = GetBreakpoint(e); var threadId = GetCurrentThread(); if (breakpoint != null) BreakpointHit?.Invoke(breakpoint, threadId); }
public override int Breakpoint(IDebugBreakpoint Bp) { if (_breakpointHandler != null) { _breakpointHandler(Bp); } return((int)DEBUG_STATUS.GO); }
private Breakpoint GetBreakpoint(IDebugBreakpoint e) { uint breakpointId; e.GetId(out breakpointId); Breakpoint result; _breakpoints.TryGetValue(breakpointId, out result); return result; }
public void CreateProcess(ulong ImageFileHandle, ulong Handle, ulong BaseOffset, uint ModuleSize, string ModuleName = null, string ImageName = null, uint CheckSum = 0, uint TimeDateStamp = 0, ulong InitialThreadHandle = 0, ulong ThreadDataOffset = 0, ulong StartOffset = 0) { const Int32 Software = 0; const Int32 Hardware = 1; const UInt32 AnyId = UInt32.MaxValue; IDebugBreakpoint bp = this.Control.AddBreakpoint2(Software, AnyId); bp.SetOffset(0x1003830); bp.SetFlags((UInt32)DEBUG_BREAKPOINT_FLAG.ENABLED); }
/// <summary> /// Callback executed when breakpoint gets hit. /// </summary> /// <param name="Bp">Breakpoint that was hit.</param> /// <returns></returns> public int Breakpoint(IDebugBreakpoint Bp) { uint bpId = Bp.GetId(); BreakpointHitResult actionStatus = breakpoints[bpId].ExecuteAction(); if (actionStatus == BreakpointHitResult.Continue) { debugStatusGoEvent.Set(); return((int)Defines.DebugStatusGo); } else { return((int)Defines.DebugStatusBreak); } }
/// <summary> /// The given breakpoint has been bound to the VM. /// </summary> internal void OnBound(IDebugBreakpoint breakpoint) { DLog.Debug(DContext.VSDebuggerComCall, "DebugBoundBreakpoint.OnBound"); // Check parameters if (this.breakpoint != breakpoint) { throw new ArgumentException("Unknown breakpoint"); } // Record in pending breakpoint pendingBreakpoint.AddBoundBreakpoint(this); // Notify VS breakpointManager.OnBound(pendingBreakpoint); }
public int Breakpoint(IDebugBreakpoint Bp) { StringBuilder str = new StringBuilder(100); uint size = 0; bool run = false; Bp.GetOffsetExpression(str, 100, out size); foreach (var keyvalue in targets) { if (keyvalue.Key.ToLower() == str.ToString().ToLower()) { run = keyvalue.Value.Invoke(Bp, str.ToString()); } } if (run) { return((int)DEBUG_STATUS.GO); // (int)DEBUG_STATUS.REVERSE_GO (backwards) } return((int)DEBUG_STATUS.BREAK); }
public virtual int Breakpoint(IDebugBreakpoint Bp) { return((int)DEBUG_STATUS.NO_CHANGE); }
public int Breakpoint(IDebugBreakpoint Bp) { return((int)DEBUG_STATUS.GO); }
public void Breakpoint(IDebugBreakpoint Bp) { }
public void Breakpoint(IDebugBreakpoint Bp) { // Do nothing }
public int Breakpoint([In, MarshalAs(UnmanagedType.Interface)] IDebugBreakpoint Bp) { BreakpointHit = true; StateChanged = true; return((int)DEBUG_STATUS.BREAK); }
public int Breakpoint(IDebugBreakpoint breakpoint) { BreakpointHit?.Invoke(this, breakpoint); return((int)DEBUG_STATUS.BREAK); }
public void Breakpoint(IDebugBreakpoint Bp) { throw new NotImplementedException(); }
public int Breakpoint(IDebugBreakpoint Bp) { return (int)DEBUG_STATUS.GO; }
public virtual int Breakpoint(IDebugBreakpoint Bp) { return (int)DEBUG_STATUS.NO_CHANGE; }
public void Breakpoint(IDebugBreakpoint Bp) { throw new NotImplementedException(); }
public void Breakpoint(IDebugBreakpoint Bp) { // Do nothing }
int IDebugEventCallbacks.Breakpoint(IDebugBreakpoint Bp) { // Do nothing. return(0); }