void EnsureRecentThreadIsValid (ProcessInfo process) { var infos = process.GetThreads (); if (ThreadIsAlive (recent_thread) && HasUserFrame (GetId (recent_thread), infos)) return; var threads = vm.GetThreads (); foreach (var thread in threads) { if (ThreadIsAlive (thread) && HasUserFrame (GetId (thread), infos)) { recent_thread = thread; return; } } recent_thread = threads[0]; }
void AppendThreads (TreeIter iter, ProcessInfo process, DebuggerSession session) { var threads = process.GetThreads (); Array.Sort (threads, (ThreadInfo t1, ThreadInfo t2) => t1.Id.CompareTo (t2.Id)); session.FetchFrames (threads); var activeThread = session.ActiveThread; foreach (var thread in threads) { var name = thread.Name == null && thread.Id == 1 ? GettextCatalog.GetString ("Main Thread") : thread.Name; var weight = thread == activeThread ? Pango.Weight.Bold : Pango.Weight.Normal; var icon = thread == activeThread ? Gtk.Stock.GoForward : null; if (iter.Equals (TreeIter.Zero)) store.AppendValues (icon, thread.Id.ToString (), name, thread, (int)weight, thread.Location, session); else store.AppendValues (iter, icon, thread.Id.ToString (), name, thread, (int)weight, thread.Location, session); } }
void AppendThreads (TreeIter it, ProcessInfo p) { ThreadInfo[] threads = p.GetThreads (); Array.Sort (threads, delegate (ThreadInfo t1, ThreadInfo t2) { return t1.Id.CompareTo (t2.Id); }); foreach (ThreadInfo t in threads) { ThreadInfo activeThread = DebuggingService.DebuggerSession.ActiveThread; Pango.Weight wi = t == activeThread ? Pango.Weight.Bold : Pango.Weight.Normal; string icon = t == activeThread ? Gtk.Stock.GoForward : null; if (it.Equals (TreeIter.Zero)) store.AppendValues (icon, t.Id.ToString (), t.Name, t, (int) wi, t.Location); else store.AppendValues (it, icon, t.Id.ToString (), t.Name, t, (int) wi, t.Location); } }
void AppendThreads (TreeIter iter, ProcessInfo process) { var threads = process.GetThreads (); Array.Sort (threads, (ThreadInfo t1, ThreadInfo t2) => t1.Id.CompareTo (t2.Id)); DebuggingService.DebuggerSession.FetchFrames (threads); foreach (var thread in threads) { ThreadInfo activeThread = DebuggingService.DebuggerSession.ActiveThread; var weight = thread == activeThread ? Pango.Weight.Bold : Pango.Weight.Normal; var icon = thread == activeThread ? Gtk.Stock.GoForward : null; if (iter.Equals (TreeIter.Zero)) store.AppendValues (icon, thread.Id.ToString (), thread.Name, thread, (int) weight, thread.Location); else store.AppendValues (iter, icon, thread.Id.ToString (), thread.Name, thread, (int) weight, thread.Location); } }