public DebuggerServer (IDebuggerController dc)
		{
			this.controller = dc;
			mdbObjectValueAdaptor = new MdbObjectValueAdaptor ();
			MarshalByRefObject mbr = (MarshalByRefObject)controller;
			ILease lease = mbr.GetLifetimeService() as ILease;
			lease.Register(this);
			max_frames = 100;
				
			ST.Thread t = new ST.Thread ((ST.ThreadStart)EventDispatcher);
			t.IsBackground = true;
			t.Start ();
		}
示例#2
0
        public DebuggerServer(IDebuggerController dc)
        {
            this.controller       = dc;
            mdbObjectValueAdaptor = new MdbObjectValueAdaptor();
            MarshalByRefObject mbr   = (MarshalByRefObject)controller;
            ILease             lease = mbr.GetLifetimeService() as ILease;

            lease.Register(this);
            max_frames = 100;

            ST.Thread t = new ST.Thread((ST.ThreadStart)EventDispatcher);
            t.IsBackground = true;
            t.Start();
        }
 public ControllerPauseEventArgs(IDebuggerController controller, IThread thread, PauseReason reason)
     : base(reason)
 {
     Controller = controller;
     Thread = thread;
 }
示例#4
0
        public static void Run(string[] args)
        {
            try
            {
                // Load n-refactory from MD's dir
                string path = typeof(Mono.Debugging.Client.DebuggerSession).Assembly.Location;
                path = System.IO.Path.GetDirectoryName(path);
                path = System.IO.Path.Combine(path, "NRefactory.dll");
                Assembly.LoadFrom(path);

                string channel = Console.In.ReadLine();

                string unixPath = null;
                if (channel == "unix")
                {
                    unixPath = System.IO.Path.GetTempFileName();
                    Hashtable props = new Hashtable();
                    props["path"] = unixPath;
                    props["name"] = "__internal_unix";
                    ChannelServices.RegisterChannel(new UnixChannel(props, null, null), false);
                }
                else
                {
                    Hashtable props = new Hashtable();
                    props["port"] = 0;
                    props["name"] = "__internal_tcp";
                    BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();
                    BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();

                    serverProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
                    ChannelServices.RegisterChannel(new TcpChannel(props, clientProvider, serverProvider), false);
                }

                string sref = Console.In.ReadLine();
                byte[] data = Convert.FromBase64String(sref);

                MemoryStream        ms = new MemoryStream(data);
                BinaryFormatter     bf = new BinaryFormatter();
                IDebuggerController dc = (IDebuggerController)bf.Deserialize(ms);

                Instance = new DebuggerServer(dc);
                dc.RegisterDebugger(Instance);
                try
                {
                    dc.WaitForExit();
                }
                catch (Exception e)
                {
                    Console.WriteLine("DS: Exception while waiting for WaitForExit: {0}", e.ToString());
                }

                try
                {
                    Instance.Dispose();
                }
                catch
                {
                }

                if (unixPath != null)
                {
                    File.Delete(unixPath);
                }
            } catch (Exception e)
            {
                Console.WriteLine("DS: {0}", e.ToString());
            }

            // Delay the exit a few seconds, to make sure all remoting calls
            // from the client have been completed
            System.Threading.Thread.Sleep(3000);

            Console.WriteLine("DebuggerServer exiting.");
        }
示例#5
0
 public GenericDebuggerEventArgs(T target, IDebuggerController controller, bool @continue)
     : base(controller, @continue)
 {
     TargetObject = target;
 }
示例#6
0
 public GenericDebuggerEventArgs(T target, IDebuggerController controller)
     : this(target, controller, true)
 {
 }
示例#7
0
 public DebuggerEventArgs(IDebuggerController controller, bool @continue)
 {
     Controller = controller;
     Continue   = @continue;
 }
示例#8
0
 public ControllerPauseEventArgs(IDebuggerController controller, IThread thread, PauseReason reason)
     : base(reason)
 {
     Controller = controller;
     Thread     = thread;
 }