Пример #1
0
        /// <summary>
        /// Creates the snapshot entry for the given variable name.
        /// </summary>
        /// <param name="variable">The variable name.</param>
        /// <param name="global">Determines whether variable is global or local.</param>
        /// <param name="callLevel">The call level.</param>
        internal static ReadWriteSnapshotEntryBase CreateVariableEntry(AnalysisFramework.VariableIdentifier variable, GlobalContext global, int callLevel)
        {
            MemoryPath path;

            if (variable.IsUnknown)
            {
                path = MemoryPath.MakePathAnyVariable(global, callLevel);
            }
            else
            {
                var names = from name in variable.PossibleNames select name.Value;
                path = MemoryPath.MakePathVariable(names, global, callLevel);
            }

            return(new SnapshotEntry(path, variable));
        }
Пример #2
0
 /// <summary>
 /// Creates the snapshot entry for the given variable name.
 /// </summary>
 /// <param name="variable">The variable name.</param>
 /// <param name="global">Determines whether variable is global or local.</param>
 internal static ReadWriteSnapshotEntryBase CreateVariableEntry(AnalysisFramework.VariableIdentifier variable, GlobalContext global)
 {
     return(CreateVariableEntry(variable, global, Snapshot.GLOBAL_CALL_LEVEL));
 }
Пример #3
0
        /// <summary>
        /// Read memory represented by given field identifier resolved on current
        /// snapshot entry (resulting snapshot entry can encapsulate merging, alias resolving and
        /// other stuff based on nondeterminism of identifier and current snapshot entry)
        /// </summary>
        /// <param name="context">Context snapshot where operation is proceeded</param>
        /// <param name="field">Identifier of an field</param>
        /// <returns>
        /// Snapshot entry representing field resolving on current entry
        /// </returns>
        protected override ReadWriteSnapshotEntryBase readField(SnapshotBase context, AnalysisFramework.VariableIdentifier field)
        {
            MemoryPath newPath;

            if (field.IsUnknown)
            {
                newPath = MemoryPath.MakePathAnyField(path);
            }
            else
            {
                var names = from name in field.PossibleNames select name.Value;
                newPath = MemoryPath.MakePathField(path, names);
            }

            return(new SnapshotEntry(newPath, variableId));
        }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SnapshotEntry"/> class.
 /// </summary>
 /// <param name="path">The variable acces path.</param>
 /// <param name="variableId">The variable unique identifier.</param>
 private SnapshotEntry(MemoryPath path, AnalysisFramework.VariableIdentifier variableId)
 {
     this.path       = path;
     this.variableId = variableId;
 }
Пример #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SnapshotEntry"/> class.
        /// </summary>
        /// <param name="path">The variable acces path.</param>
        internal SnapshotEntry(MemoryPath path)
        {
            this.path = path;

            this.variableId = null;
        }
Пример #6
0
        /// <summary>
        /// Read memory represented by given field identifier resolved on current
        /// snapshot entry (resulting snapshot entry can encapsulate merging, alias resolving and
        /// other stuff based on nondeterminism of identifier and current snapshot entry)
        /// </summary>
        /// <param name="context">Context snapshot where operation is proceeded</param>
        /// <param name="field">Identifier of an field</param>
        /// <returns>
        /// Snapshot entry representing field resolving on current entry
        /// </returns>
        protected override ReadWriteSnapshotEntryBase readField(SnapshotBase context, AnalysisFramework.VariableIdentifier field)
        {
            SnapshotLogger.append(context, "read index - " + this.ToString());

            return(getTemporary(context).ReadField(context, field));
        }