public void Breakpoint(Types.SuspendPolicy suspendPolicy, RequestId requestId, ThreadId threadId, Types.Location location) { ThreadReference thread = VirtualMachine.GetMirrorOf(threadId); EventRequest request = VirtualMachine.EventRequestManager.GetEventRequest(EventKind.Breakpoint, requestId); Location loc = VirtualMachine.GetMirrorOf(location); ThreadLocationEventArgs e = new ThreadLocationEventArgs(VirtualMachine, (SuspendPolicy)suspendPolicy, request, thread, loc); VirtualMachine.EventQueue.OnBreakpoint(e); }
private void HandleMethodEntry(object sender, ThreadLocationEventArgs e) { if (e.SuspendPolicy == SuspendPolicy.All) { Interlocked.Increment(ref _suspended); } throw new NotImplementedException(); }
private void HandleSingleStep(object sender, ThreadLocationEventArgs e) { if (e.SuspendPolicy == SuspendPolicy.All) { Interlocked.Increment(ref _suspended); } IStepRequest request = e.Request as IStepRequest; if (request == null) { throw new ArgumentException(); } JavaDebugThread thread; lock (_threads) { this._threads.TryGetValue(e.Thread.GetUniqueId(), out thread); } if (e.Request == _causeBreakRequest) { _causeBreakRequest.IsEnabled = false; DebugEvent debugEvent = new DebugBreakEvent(GetAttributesForEvent(e)); SetEventProperties(debugEvent, e, false); Callback.Event(DebugEngine, Process, this, thread, debugEvent); return; } else if (thread != null) { bool wasThreadStepRequest = thread.StepRequests.Contains(request); if (wasThreadStepRequest) { e.Request.IsEnabled = false; DebugEvent debugEvent = new DebugStepCompleteEvent(GetAttributesForEvent(e)); SetEventProperties(debugEvent, e, false); Callback.Event(DebugEngine, Process, this, thread, debugEvent); return; } } }
private void HandleBreakpoint(object sender, ThreadLocationEventArgs e) { if (e.SuspendPolicy == SuspendPolicy.All) { Interlocked.Increment(ref _suspended); } List <IDebugBoundBreakpoint2> breakpoints = new List <IDebugBoundBreakpoint2>(); foreach (var pending in DebugEngine.PendingBreakpoints) { if (pending.GetState() != enum_PENDING_BP_STATE.PBPS_ENABLED) { continue; } foreach (var breakpoint in pending.EnumBoundBreakpoints().OfType <JavaDebugBoundBreakpoint>()) { if (breakpoint.EventRequest.Equals(e.Request) && breakpoint.GetState() == enum_BP_STATE.BPS_ENABLED) { breakpoints.Add(breakpoint); } } } if (breakpoints.Count == 0) { ManualContinueFromEvent(e); return; } JavaDebugThread thread; lock (_threads) { this._threads.TryGetValue(e.Thread.GetUniqueId(), out thread); } DebugEvent debugEvent = new DebugBreakpointEvent(GetAttributesForEvent(e), new EnumDebugBoundBreakpoints(breakpoints)); SetEventProperties(debugEvent, e, false); Callback.Event(DebugEngine, Process, this, thread, debugEvent); }