Inheritance: DebuggerMutex
Exemplo n.º 1
0
        internal ThreadManager(Debugger debugger)
        {
            this.debugger = debugger;

            thread_hash = Hashtable.Synchronized(new Hashtable());
            engine_hash = Hashtable.Synchronized(new Hashtable());
            processes   = ArrayList.Synchronized(new ArrayList());

            pending_events = Hashtable.Synchronized(new Hashtable());

            last_pending_sigstop = DateTime.Now;
            pending_sigstops     = new Dictionary <int, DateTime> ();

            address_domain = AddressDomain.Global;

            wait_event   = new ST.AutoResetEvent(false);
            engine_event = new ST.ManualResetEvent(true);
            ready_event  = new ST.ManualResetEvent(false);

            event_queue            = new DebuggerEventQueue("event_queue");
            event_queue.DebugFlags = DebugFlags.Wait;

            mono_debugger_server_global_init();

            wait_thread = new ST.Thread(new ST.ThreadStart(start_wait_thread));
            wait_thread.IsBackground = true;
            wait_thread.Start();

            inferior_thread = new ST.Thread(new ST.ThreadStart(start_inferior));
            inferior_thread.IsBackground = true;
            inferior_thread.Start();

            ready_event.WaitOne();
        }
Exemplo n.º 2
0
        internal ThreadManager(Debugger debugger)
        {
            this.debugger = debugger;

            thread_hash = Hashtable.Synchronized (new Hashtable ());
            engine_hash = Hashtable.Synchronized (new Hashtable ());
            processes = ArrayList.Synchronized (new ArrayList ());

            pending_events = Hashtable.Synchronized (new Hashtable ());

            last_pending_sigstop = DateTime.Now;
            pending_sigstops = new Dictionary<int,DateTime> ();

            address_domain = AddressDomain.Global;

            wait_event = new ST.AutoResetEvent (false);
            engine_event = new ST.ManualResetEvent (true);
            ready_event = new ST.ManualResetEvent (false);

            event_queue = new DebuggerEventQueue ("event_queue");
            event_queue.DebugFlags = DebugFlags.Wait;

            mono_debugger_server_global_init ();

            wait_thread = new ST.Thread (new ST.ThreadStart (start_wait_thread));
            wait_thread.IsBackground = true;
            wait_thread.Start ();

            inferior_thread = new ST.Thread (new ST.ThreadStart (start_inferior));
            inferior_thread.IsBackground = true;
            inferior_thread.Start ();

            ready_event.WaitOne ();
        }