Package ghidra.program.model.lang
Class DynamicVariableStorage
java.lang.Object
ghidra.program.model.listing.VariableStorage
ghidra.program.model.lang.DynamicVariableStorage
- All Implemented Interfaces:
Comparable<VariableStorage>
-
Field Summary
Fields inherited from class ghidra.program.model.listing.VariableStorage
BAD_STORAGE, programArch, UNASSIGNED_STORAGE, varnodes, VOID_STORAGE
-
Constructor Summary
ConstructorsConstructorDescriptionDynamicVariableStorage
(ProgramArchitecture program, boolean forcedIndirect, Address address, int size) Construct dynamic variable storageDynamicVariableStorage
(ProgramArchitecture program, boolean forcedIndirect, Varnode... varnodes) Construct dynamic variable storageDynamicVariableStorage
(ProgramArchitecture program, AutoParameterType autoParamType, Address address, int size) Construct dynamic variable storage with an optional auto-parameter typeDynamicVariableStorage
(ProgramArchitecture program, AutoParameterType autoParamType, Varnode... varnodes) Construct dynamic variable storage with an optional auto-parameter type -
Method Summary
Modifier and TypeMethodDescriptionIf this storage corresponds to a auto-parameter, return the type associated with the auto-parameter.static DynamicVariableStorage
getUnassignedDynamicStorage
(boolean forcedIndirect) Construct Unassigned dynamic variable storage.static DynamicVariableStorage
getUnassignedDynamicStorage
(AutoParameterType autoParamType) Construct Unassigned dynamic variable storage with an optional auto-parameter type.boolean
Associated with auto-parameters.boolean
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.boolean
toString()
Methods inherited from class ghidra.program.model.listing.VariableStorage
clone, compareTo, contains, deserialize, equals, getFirstVarnode, getLastVarnode, getLongHash, getMinAddress, getProgramArchitecture, getRegister, getRegisters, getSerializationString, getSerializationString, getStackOffset, getVarnodeCount, getVarnodes, getVarnodes, hashCode, hasStackStorage, intersects, intersects, intersects, isBadStorage, isCompoundStorage, isConstantStorage, isHashStorage, isMemoryStorage, isRegisterStorage, isStackStorage, isUniqueStorage, isValid, isVoidStorage, size, translateSerialization
-
Constructor Details
-
DynamicVariableStorage
public DynamicVariableStorage(ProgramArchitecture 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 applicableaddress
- varnode addresssize
- varnode size- Throws:
InvalidInputException
-
DynamicVariableStorage
public DynamicVariableStorage(ProgramArchitecture 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 applicablevarnodes
- one or more ordered storage varnodes- Throws:
InvalidInputException
- if specified varnodes violate storage restrictions
-
DynamicVariableStorage
public DynamicVariableStorage(ProgramArchitecture 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 typeaddress
- varnode addresssize
- varnode size- Throws:
InvalidInputException
-
DynamicVariableStorage
public DynamicVariableStorage(ProgramArchitecture 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 typevarnodes
- one or more ordered storage varnodes- Throws:
InvalidInputException
- if specified varnodes violate storage restrictions
-
-
Method Details
-
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 classVariableStorage
- 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 classVariableStorage
- Returns:
- true if this storage is associated with an auto-parameter, else false
-
isUnassignedStorage
public boolean isUnassignedStorage()- Overrides:
isUnassignedStorage
in classVariableStorage
- Returns:
- true if storage has not been assigned (no varnodes)
-
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 classVariableStorage
- Returns:
- auto-parameter type or null if not applicable
-
toString
- Overrides:
toString
in classVariableStorage
-
getUnassignedDynamicStorage
Construct Unassigned dynamic variable storage with an optional auto-parameter type. NOTE: TheisUnassignedStorage()
method should be used to detect this type of storage.- Parameters:
autoParamType
- auto-parameter type or null if not applicable
-
getUnassignedDynamicStorage
Construct Unassigned dynamic variable storage. NOTE: TheisUnassignedStorage()
method should be used to detect this type of storage.- Parameters:
forcedIndirect
- if true indicates that the parameter has been forced to pass as a pointer instead of its raw type
-