Class DynamicVariableStorage

    • Constructor Detail

      • DynamicVariableStorage

        public DynamicVariableStorage​(Program program,
                                      AutoParameterType autoParamType,
                                      Address address,
                                      int size)
                               throws InvalidInputException
        Construct dynamic variable storage with an optional auto-parameter type
        Parameters:
        program -
        autoParamType - auto-parameter type or null if not applicable
        address - varnode address
        size - varnode size
        Throws:
        InvalidInputException
      • DynamicVariableStorage

        public DynamicVariableStorage​(Program program,
                                      AutoParameterType autoParamType,
                                      Varnode... varnodes)
                               throws InvalidInputException
        Construct dynamic variable storage with an optional auto-parameter type
        Parameters:
        program -
        autoParamType - auto-parameter type or null if not applicable
        varnodes - one or more ordered storage varnodes
        Throws:
        InvalidInputException - if specified varnodes violate storage restrictions
      • DynamicVariableStorage

        public DynamicVariableStorage​(Program program,
                                      boolean forcedIndirect,
                                      Address address,
                                      int size)
                               throws InvalidInputException
        Construct dynamic variable storage
        Parameters:
        program -
        forcedIndirect - if true indicates that the parameter has been forced to pass as a pointer instead of its raw type
        address - varnode address
        size - varnode size
        Throws:
        InvalidInputException
      • DynamicVariableStorage

        public DynamicVariableStorage​(Program program,
                                      boolean forcedIndirect,
                                      Varnode... varnodes)
                               throws InvalidInputException
        Construct dynamic variable storage
        Parameters:
        program -
        forcedIndirect - if true indicates that the parameter has been forced to pass as a pointer instead of its raw type
        varnodes - one or more ordered storage varnodes
        Throws:
        InvalidInputException - if specified varnodes violate storage restrictions
    • Method Detail

      • isForcedIndirect

        public boolean isForcedIndirect()
        Description copied from class: VariableStorage
        If this storage corresponds to parameter which was forced by the associated calling convention to be passed as a pointer instead of its raw type.
        Overrides:
        isForcedIndirect in class VariableStorage
        Returns:
        true if this parameter was forced to be passed as a pointer instead of its raw type
      • isAutoStorage

        public boolean isAutoStorage()
        Description copied from class: VariableStorage
        Associated with auto-parameters. Parameters whose existence is dictated by a calling-convention may automatically inject additional hidden parameters. If this storage is associated with a auto-parameter, this method will return true.
        Overrides:
        isAutoStorage in class VariableStorage
        Returns:
        true if this storage is associated with an auto-parameter, else false
      • isUnassignedStorage

        public boolean isUnassignedStorage()
        Overrides:
        isUnassignedStorage in class VariableStorage
        Returns:
        true if storage has not been assigned (no varnodes)
      • getAutoParameterType

        public AutoParameterType getAutoParameterType()
        Description copied from class: VariableStorage
        If this storage corresponds to a auto-parameter, return the type associated with the auto-parameter.
        Overrides:
        getAutoParameterType in class VariableStorage
        Returns:
        auto-parameter type or null if not applicable
      • getUnassignedDynamicStorage

        public static DynamicVariableStorage getUnassignedDynamicStorage​(AutoParameterType autoParamType)
        Construct Unassigned dynamic variable storage with an optional auto-parameter type. NOTE: The isUnassignedStorage() method should be used to detect this type of storage.
        Parameters:
        autoParamType - auto-parameter type or null if not applicable
      • getUnassignedDynamicStorage

        public static DynamicVariableStorage getUnassignedDynamicStorage​(boolean forcedIndirect)
        Construct Unassigned dynamic variable storage. NOTE: The isUnassignedStorage() method should be used to detect this type of storage.
        Parameters:
        program -
        forcedIndirect - if true indicates that the parameter has been forced to pass as a pointer instead of its raw type