상속: ClrDumpType
예제 #1
0
 internal void Setup(ClrDumpObject clrDumpObject)
 {
     ClrDump = clrDumpObject.ClrDump;
     Icon = Properties.Resources.molecule_small;
     ClrDumpObject = clrDumpObject;
     Name = $"#{ClrDump.Id} - RootPath- {ClrDumpObject.Address:X}";
 }
예제 #2
0
 public void Init(ClrDumpObject clrDumpObject)
 {
     ClrDumpObject = clrDumpObject;
     ClrDump = clrDumpObject.ClrDump;
     tbAddress.Text = clrDumpObject.Address.ToString("X");
     tbType.Text = clrDumpObject.ClrType?.Name;
 }
예제 #3
0
 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 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;
 }
예제 #5
0
        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);
        }
예제 #6
0
        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;
        }
예제 #7
0
 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);
         }
     }
 }
예제 #8
0
        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;
        }
예제 #9
0
 internal void Setup(ClrDumpObject clrDumpObject)
 {
     Init(clrDumpObject);
     InitColumns();
 }
 public SelectedClrDumpObjectMessage(ClrDumpObject selectedInstance) => SelectedInstance = selectedInstance;
예제 #11
0
 public RootPathInformation(ClrDumpObject clrDumpObject, string fieldName)
 {
     ClrDumpObject = clrDumpObject;
     FieldName = fieldName;
 }
예제 #12
0
 public BookmarkMessage(BookmarkAction action, ClrDumpObject clrDumpObject)
 {
     Action = action;
     ClrDumpObject = clrDumpObject;
 }
 public SelectedClrDumpObjectMessage(ClrDumpObject selectedInstance)
 {
     SelectedInstance = selectedInstance;
 }