internal void Setup(ClrDumpObject clrDumpObject) { ClrDump = clrDumpObject.ClrDump; Icon = Properties.Resources.molecule_small; ClrDumpObject = clrDumpObject; Name = $"#{ClrDump.Id} - RootPath- {ClrDumpObject.Address:X}"; }
public void Init(ClrDumpObject clrDumpObject) { ClrDumpObject = clrDumpObject; ClrDump = clrDumpObject.ClrDump; tbAddress.Text = clrDumpObject.Address.ToString("X"); tbType.Text = clrDumpObject.ClrType?.Name; }
public ArrayElementsAddressContainer(ClrDumpObject clrDumpObject) { this.clrDumpObject = clrDumpObject; if (!clrDumpObject.ClrType.IsArray) { throw new ArgumentException($"{clrDumpObject.TypeName} is not an array !"); } clrObject = new ClrObject(clrDumpObject.Address, clrDumpObject.ClrType, clrDumpObject.IsInterior); Count = clrDumpObject.ArrayLength; }
public void Setup(ClrDumpObject clrDumpObject) { this.clrDumpObject = clrDumpObject; ClrDump = clrDumpObject.ClrDump; Icon = Properties.Resources.table_lightning_small; Name = $"#{ClrDump.Id} - {clrDumpObject.Address:X} - Targets"; dlvDelegateTargets.InitColumns<DelegateTargetInformation>(); dlvDelegateTargets.SetUpAddressColumn<DelegateTargetInformation>(this); dlvDelegateTargets.SetUpTypeColumn<DelegateTargetInformation>(this); }
internal static List<DelegateTargetInformation> GetDelegateTargetInformations(ClrDumpObject clrDumpObject) { var targetInformations = new List<DelegateTargetInformation>(); ClrObject clrObject = clrDumpObject.ClrObject; ClrDump clrDump = clrDumpObject.ClrDump; foreach (var handlerObject in EnumerateHandlers(clrObject)) { var target = handlerObject[TargetFieldName]; var methInfo = GetDelegateMethod(clrDump, handlerObject, target); var targetInfo = new DelegateTargetInformation(target.Address, new ClrDumpType(clrDump, target.Type), methInfo); targetInformations.Add(targetInfo); } return targetInformations; }
private void OnCellClick(object sender, CellClickEventArgs e) { if( e.ClickCount == 2 && e.Model != null) { var arrayInstance = dlvArrays.SelectedObject<ArrayInstanceInformation>(); if (arrayInstance != null) { var address = arrayInstance.Address; var type = ClrDump.GetObjectType(address); if (type == null) { Log($"Can't find type for instance: {address:X}", LogLevelType.Error); return; } var clrDumpObject = new ClrDumpObject(ClrDump, type, address); InstanceDetailsCommand.Display(this, clrDumpObject); } } }
public static List<RootPathInformation> AnalyzeRootPath(MessageBus msgBus, ClrDumpObject clrDumpObject) { ClrDump clrDump = clrDumpObject.ClrDump; ulong address = clrDumpObject.Address; CancellationTokenSource token = new CancellationTokenSource(); msgBus.BeginTask("Analysing Root Path...", token); if( token.IsCancellationRequested) { msgBus.EndTask("Root Path analysis: cancelled."); return null; } msgBus.Status("Analysing Root Path: collecting root instances..."); var roots = new HashSet<ulong>(clrDump.EnumerateClrRoots.Select(clrRoot => clrRoot.Object)); if (logger.IsDebugEnabled) { logger.Debug("Roots: " + Str(roots)); } List<ulong> bestPath = null; var currentPath = new List<ulong>(); currentPath.Add(address); bool result = FindShortestPath(currentPath, ref bestPath, clrDump); List<RootPathInformation> path = new List<RootPathInformation>(); ulong prevAddress = address; if (bestPath != null) { foreach (var refAddress in bestPath) { var refClrDumpObject = new ClrDumpObject(clrDump, clrDump.GetObjectType(refAddress), refAddress); var fieldName = refAddress == address ? " - " : clrDump.GetFieldNameReference(prevAddress, refAddress); fieldName = TypeHelpers.RealName(fieldName); path.Add(new RootPathInformation(refClrDumpObject, fieldName)); prevAddress = refAddress; } msgBus.EndTask("Root Path found."); } else { msgBus.EndTask("Root Path NOT found."); } return path; }
internal void Setup(ClrDumpObject clrDumpObject) { Init(clrDumpObject); InitColumns(); }
public SelectedClrDumpObjectMessage(ClrDumpObject selectedInstance) => SelectedInstance = selectedInstance;
public RootPathInformation(ClrDumpObject clrDumpObject, string fieldName) { ClrDumpObject = clrDumpObject; FieldName = fieldName; }
public BookmarkMessage(BookmarkAction action, ClrDumpObject clrDumpObject) { Action = action; ClrDumpObject = clrDumpObject; }
public SelectedClrDumpObjectMessage(ClrDumpObject selectedInstance) { SelectedInstance = selectedInstance; }