Esempio n. 1
0
        private void FindWhatInteractsWithSelectedNode(bool writeOnly)
        {
            var selectedNode = memoryViewControl.GetSelectedNodes().FirstOrDefault();

            if (selectedNode == null)
            {
                return;
            }

            LinkedWindowFeatures.FindWhatInteractsWithAddress(selectedNode.Address, selectedNode.Node.MemorySize, writeOnly);
        }
Esempio n. 2
0
        /// <summary>
        /// Attaches the debugger to find what interacts with the selected record.
        /// </summary>
        /// <exception cref="ArgumentOutOfRangeException">Thrown when one or more arguments are outside the required range.</exception>
        /// <param name="record">The record.</param>
        /// <param name="writeOnly">True to search only for write access.</param>
        private static void FindWhatInteractsWithSelectedRecord(MemoryRecord record, bool writeOnly)
        {
            int size;

            switch (record.ValueType)
            {
            case ScanValueType.Byte:
                size = 1;
                break;

            case ScanValueType.Short:
                size = 2;
                break;

            case ScanValueType.Integer:
            case ScanValueType.Float:
                size = 4;
                break;

            case ScanValueType.Long:
            case ScanValueType.Double:
                size = 8;
                break;

            case ScanValueType.ArrayOfBytes:
                size = record.ValueLength;
                break;

            case ScanValueType.String:
                size = record.ValueLength;
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            LinkedWindowFeatures.FindWhatInteractsWithAddress(record.RealAddress, size, writeOnly);
        }