Inheritance: DebuggerWaitHandle
Example #1
0
        protected ThreadDB(Process process)
        {
            this.process = process;

            mutex = new DebuggerMutex("thread_db_mutex");

            global_lookup_func = new GlobalLookupFunc(global_lookup);
            read_memory_func   = new ReadMemoryFunc(read_memory);
            write_memory_func  = new WriteMemoryFunc(write_memory);
        }
Example #2
0
        protected ThreadDB(Process process)
        {
            this.process = process;

            mutex = new DebuggerMutex ("thread_db_mutex");

            global_lookup_func = new GlobalLookupFunc (global_lookup);
            read_memory_func = new ReadMemoryFunc (read_memory);
            write_memory_func = new WriteMemoryFunc (write_memory);
        }
Example #3
0
        private void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            lock (this) {
                if (disposed)
                {
                    return;
                }

                if (handle != IntPtr.Zero)
                {
                    mono_debugger_thread_db_destroy(handle);
                    handle = IntPtr.Zero;
                }

                if (mutex != null)
                {
                    mutex.Dispose();
                    mutex = null;
                }

                disposed = true;
            }
        }
Example #4
0
        private Process(ThreadManager manager, DebuggerSession session)
        {
            this.manager = manager;
            this.session = session;

            operation_host = new MyOperationHost (this);

            thread_lock_mutex = new DebuggerMutex ("thread_lock_mutex");

            stopped_event = new ST.ManualResetEvent (false);

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

            target_info = Inferior.GetTargetInfo ();
            if (target_info.TargetAddressSize == 8)
                architecture = new Architecture_X86_64 (this, target_info);
            else
                architecture = new Architecture_I386 (this, target_info);
        }
Example #5
0
        void DoDispose()
        {
            if (!is_forked) {
                if (architecture != null) {
                    architecture.Dispose ();
                    architecture = null;
                }

                if (mono_language != null) {
                    mono_language.Dispose();
                    mono_language = null;
                }

                if (native_language != null) {
                    native_language.Dispose ();
                    native_language = null;
                }

                if (os != null) {
                    os.Dispose ();
                    os = null;
                }

                if (symtab_manager != null) {
                    symtab_manager.Dispose ();
                    symtab_manager = null;
                }
            }

            if (breakpoint_manager != null) {
                breakpoint_manager.Dispose ();
                breakpoint_manager = null;
            }

            if (thread_db != null) {
                thread_db.Dispose ();
                thread_db = null;
            }

            if (thread_lock_mutex != null) {
                thread_lock_mutex.Dispose ();
                thread_lock_mutex = null;
            }

            exception_handlers = null;

            manager.RemoveProcess (this);
        }
Example #6
0
 public static void Initialize()
 {
     mutex = new DebuggerMutex ("object_cache");
     objects = new ArrayList ();
     timer = new Timer (new TimerCallback (cleanup_process), null, 0, 60000);
 }
Example #7
0
        private void Dispose(bool disposing)
        {
            // Check to see if Dispose has already been called.
            lock (this) {
                if (disposed)
                    return;

                if (handle != IntPtr.Zero) {
                    mono_debugger_thread_db_destroy (handle);
                    handle = IntPtr.Zero;
                }

                if (mutex != null) {
                    mutex.Dispose ();
                    mutex = null;
                }

                disposed = true;
            }
        }