void UpdateThread(Thread thread) { RemoteTreeNode node = (RemoteTreeNode)threadToTreeNode[thread]; if (node == null) { node = RootNode.AppendNode(); threadToTreeNode.Add(thread, node); } bool current = interpreter.HasCurrentThread && interpreter.CurrentThread.ID == thread.ID; string location; if (thread.IsStopped) { try { location = thread.GetBacktrace().Frames[0].SourceAddress.Name; } catch { location = ""; } } else { location = ""; } node.SetValue(ColumnSelected, current ? Pixmaps.Arrow : Pixmaps.Empty); node.SetValue(ColumnID, thread.ID); node.SetValue(ColumnPID, thread.PID); node.SetValue(ColumnTID, String.Format("{0:x}", thread.TID)); node.SetValue(ColumnName, thread.Name); node.SetValue(ColumnState, thread.State.ToString()); node.SetValue(ColumnLocation, location); }
void UpdateBreakpoint(SourceBreakpoint breakpoint) { RemoteTreeNode node = (RemoteTreeNode)breakpointToTreeNode[breakpoint]; if (node == null) { node = RootNode.AppendNode(); breakpointToTreeNode.Add(breakpoint, node); } node.SetValue(ColumnLocation, new SourceCodeLocation(breakpoint.Location)); node.SetValue(ColumnImage, breakpoint.IsEnabled && breakpoint.IsActivated ? Pixmaps.Breakpoint : Pixmaps.BreakpointDisabled); node.SetValue(ColumnID, breakpoint.Index); node.SetValue(ColumnEnabled, breakpoint.IsEnabled ? "Yes" : "No"); node.SetValue(ColumnActivated, breakpoint.IsActivated ? "Yes" : "No"); node.SetValue(ColumnThreadGroup, breakpoint.ThreadGroup != null ? breakpoint.ThreadGroup.Name : "global"); node.SetValue(ColumnName, breakpoint.Name); }