상속: DebuggerMarshalByRefObject
예제 #1
0
파일: ThreadDB.cs 프로젝트: baulig/debugger
        public static ThreadDB Create(Process process, Inferior target)
        {
            ThreadDB db = new ThreadDB (process);
            if (!db.Initialize (target))
                return null;

            return db;
        }
예제 #2
0
        public static ThreadDB Create(Process process, Inferior target)
        {
            ThreadDB db = new ThreadDB(process);

            if (!db.Initialize(target))
            {
                return(null);
            }

            return(db);
        }
예제 #3
0
파일: Process.cs 프로젝트: baulig/debugger
        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);
        }
예제 #4
0
파일: Process.cs 프로젝트: baulig/debugger
        internal void InitializeThreads(Inferior inferior, bool resume_threads)
        {
            if (thread_db != null)
                return;

            thread_db = ThreadDB.Create (this, inferior);
            if (thread_db == null) {
                if (!IsManaged)
                    return;

                Report.Error ("Failed to initialize thread_db on {0}", start.CommandLine);
                throw new TargetException (TargetError.CannotStartTarget,
                               "Failed to initialize thread_db on {0}", start.CommandLine);
            }

            int[] threads = inferior.GetThreads ();
            foreach (int thread in threads) {
                if (thread_hash.Contains (thread))
                    continue;
                ThreadCreated (inferior, thread, Inferior.HasThreadEvents, resume_threads);
            }

            thread_db.GetThreadInfo (inferior, delegate (int lwp, long tid) {
                SingleSteppingEngine engine = (SingleSteppingEngine) thread_hash [lwp];
                if (engine == null) {
                    Report.Error ("Unknown thread {0} in {1}", lwp, start.CommandLine);
                    return;
                }
                engine.SetTID (tid);
            });
        }