Esempio n. 1
0
        internal void OnMethodEntry(ThreadLocationEventArgs e)
        {
            var t = MethodEntry;

            if (t != null)
            {
                t(this, e);
            }
        }
            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);
            }
Esempio n. 3
0
        internal void OnBreakpoint(ThreadLocationEventArgs e)
        {
            var t = Breakpoint;

            if (t != null)
            {
                t(this, e);
            }
        }
Esempio n. 4
0
        internal void OnSingleStep(ThreadLocationEventArgs e)
        {
            var t = SingleStep;

            if (t != null)
            {
                t(this, e);
            }
        }
Esempio n. 5
0
        private void HandleMethodEntry(object sender, ThreadLocationEventArgs e)
        {
            if (e.SuspendPolicy == SuspendPolicy.All)
                Interlocked.Increment(ref _suspended);

            throw new NotImplementedException();
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        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;
                }
            }
        }
Esempio n. 8
0
 internal void OnMethodEntry(ThreadLocationEventArgs e)
 {
     var t = MethodEntry;
     if (t != null)
         t(this, e);
 }
Esempio n. 9
0
 internal void OnBreakpoint(ThreadLocationEventArgs e)
 {
     var t = Breakpoint;
     if (t != null)
         t(this, e);
 }
Esempio n. 10
0
 internal void OnSingleStep(ThreadLocationEventArgs e)
 {
     var t = SingleStep;
     if (t != null)
         t(this, e);
 }