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 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; }
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."); }
public GenericDebuggerEventArgs(T target, IDebuggerController controller, bool @continue) : base(controller, @continue) { TargetObject = target; }
public GenericDebuggerEventArgs(T target, IDebuggerController controller) : this(target, controller, true) { }
public DebuggerEventArgs(IDebuggerController controller, bool @continue) { Controller = controller; Continue = @continue; }