예제 #1
0
        void UpdateThread(Process thread)
        {
            TreeRowReference row = (TreeRowReference)thread_rows[thread];
            TreeIter iter;

            if (row != null && store.GetIter (out iter, row.Path)) {
                store.SetValue (iter, 0, thread.ID);
                store.SetValue (iter, 1, thread.PID);
                store.SetValue (iter, 2, thread.State.ToString());

                string location;
                if (thread.IsStopped)
                    location = thread.GetBacktrace().Frames[0].SourceAddress.Name;
                else
                    location = "";

                store.SetValue (iter, 3, location);
            }
            else {
                AddThread (thread);
            }
        }
예제 #2
0
 void AddThread(Process thread)
 {
     TreeIter iter;
     store.Append (out iter);
     store.SetValue (iter, 0, new GLib.Value (thread.ID));
     store.SetValue (iter, 1, new GLib.Value (thread.PID));
     store.SetValue (iter, 2, new GLib.Value (thread.State.ToString()));
     if (thread.IsStopped)
         store.SetValue (iter, 3, new GLib.Value (thread.GetBacktrace().Frames[0].SourceAddress.Name));
     else
         store.SetValue (iter, 3, new GLib.Value (""));
     thread_rows.Add (thread, new TreeRowReference (store, store.GetPath (iter)));
 }