コード例 #1
0
ファイル: VirtualMachine.cs プロジェクト: soulhez/debugger
        public void Attach(int port)
        {
            LogProvider.Log("Attempting connection at port {0}...", port);
            MDS.VirtualMachineManager.DefaultTimeout = 500;
            vm = MDS.VirtualMachineManager.Connect(new IPEndPoint(IPAddress.Loopback, port));
            vm.EnableEvents(
                MDS.EventType.AppDomainCreate,
                MDS.EventType.AppDomainUnload,
                MDS.EventType.VMStart,
                MDS.EventType.VMDeath,
                MDS.EventType.VMDisconnect,
                MDS.EventType.AssemblyLoad,
                MDS.EventType.AssemblyUnload,
                MDS.EventType.ThreadStart,
                MDS.EventType.ThreadDeath
                );

            methodEntryRequest = new EventRequest(vm.CreateMethodEntryRequest());
            QueueUserWorkItem(EventLoop);
        }
コード例 #2
0
        public void Connect()
        {
            WithErrorLogging(() =>
            {
                Trace("Attempting connection at port {0}...", _debuggerPort);

                _vm = VirtualMachineManager.Connect(new IPEndPoint(IPAddress.Loopback, _debuggerPort));
                _vm.Suspend();
                _vm.EnableEvents(
                    EventType.AssemblyLoad,
                    EventType.AssemblyUnload,
                    EventType.AppDomainUnload,
                    EventType.AppDomainCreate,
                    EventType.VMDeath,
                    EventType.VMDisconnect,
                    EventType.TypeLoad
                    );
                _methodEntryRequest = _vm.CreateMethodEntryRequest();
                StartEventLoop();
            });
        }
コード例 #3
0
ファイル: VirtualMachine.cs プロジェクト: soulhez/debugger
        public VirtualMachine()
            : base(null)
        {
            Factory.Register(
                location => new SdbBreakpoint(vm.CreateBreakpointRequest(location.Unwrap <MDS.Location> ()), location),
                (thread, stepType) =>
            {
                var request = vm.CreateStepRequest(thread.Unwrap <MDS.ThreadMirror>());
                switch (stepType)
                {
                case StepType.Into: request.Depth = MDS.StepDepth.Into; break;

                case StepType.Over: request.Depth = MDS.StepDepth.Over; break;

                case StepType.Out: request.Depth = MDS.StepDepth.Out; break;
                }
                return(Cache.Lookup <EventRequest>(request));
            },
                () => new EventRequest(vm.CreateMethodEntryRequest()),
                () => new EventRequest(vm.CreateMethodExitRequest()),
                (source, line) => new SdbLocation(source, line)
                );
        }
コード例 #4
0
ファイル: DebuggerSession-old.cs プロジェクト: shana/debugger
        public void Connect()
        {
            WithErrorLogging(() =>
            {
                Trace("Attempting connection at port {0}...", _debuggerPort);

                _vm = VirtualMachineManager.Connect(new IPEndPoint(IPAddress.Loopback, _debuggerPort));
                _vm.Suspend();
                _vm.EnableEvents(
                    EventType.AssemblyLoad,
                    EventType.AssemblyUnload,
                    EventType.AppDomainUnload,
                    EventType.AppDomainCreate,
                    EventType.VMDeath,
                    EventType.VMDisconnect,
                    EventType.TypeLoad
                    );
                _methodEntryRequest = _vm.CreateMethodEntryRequest();
                StartEventLoop();
            });
        }
コード例 #5
0
ファイル: VirtualMachine.cs プロジェクト: Smilediver/debugger
        public void Attach(int port)
        {
            LogProvider.Log ("Attempting connection at port {0}...", port);
            vm = MDS.VirtualMachineManager.Connect (new IPEndPoint (IPAddress.Loopback, port));
            vm.EnableEvents (
                MDS.EventType.AppDomainCreate,
                MDS.EventType.AppDomainUnload,
                MDS.EventType.VMStart,
                MDS.EventType.VMDeath,
                MDS.EventType.VMDisconnect,
                MDS.EventType.AssemblyLoad,
                MDS.EventType.AssemblyUnload
            );

            methodEntryRequest = new EventRequest (vm.CreateMethodEntryRequest ());
            QueueUserWorkItem (EventLoop);
        }