Class ConvertToPointer
java.lang.Object
ghidra.program.model.lang.protorules.AssignAction
ghidra.program.model.lang.protorules.ConvertToPointer
Action converting the parameter's data-type to a pointer, and assigning storage for the pointer.
This assumes the data-type is stored elsewhere and only the pointer is passed as a parameter.
-
Field Summary
Fields inherited from class ghidra.program.model.lang.protorules.AssignAction
FAIL, HIDDENRET_PTRPARAM, HIDDENRET_SPECIALREG, HIDDENRET_SPECIALREG_VOID, NO_ASSIGNMENT, resource, SUCCESS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
assignAddress
(DataType dt, PrototypePieces proto, int pos, DataTypeManager dtManager, int[] status, ParameterPieces res) Assign an address and other meta-data for a specific parameter or for return storage in context The Address is assigned based on the data-type of the parameter, available register resources, and other details of the function prototype.clone
(ParamListStandard newResource) Make a copy of this actionvoid
Save this action and its configuration to a streamboolean
Test if the given action is configured and performs identically to thisvoid
restoreXml
(XmlPullParser parser) Configure any details of how this action should behave from the streamMethods inherited from class ghidra.program.model.lang.protorules.AssignAction
restoreActionXml, restoreSideeffectXml
-
Constructor Details
-
ConvertToPointer
-
-
Method Details
-
clone
Description copied from class:AssignAction
Make a copy of this action- Specified by:
clone
in classAssignAction
- Parameters:
newResource
- is the new resource object that will own the clone- Returns:
- the newly allocated copy
- Throws:
InvalidInputException
- if required configuration is not present in new resource object
-
isEquivalent
Description copied from class:AssignAction
Test if the given action is configured and performs identically to this- Specified by:
isEquivalent
in classAssignAction
- Parameters:
op
- is the given action- Returns:
- true if the two actions are equivalent
-
assignAddress
public int assignAddress(DataType dt, PrototypePieces proto, int pos, DataTypeManager dtManager, int[] status, ParameterPieces res) Description copied from class:AssignAction
Assign an address and other meta-data for a specific parameter or for return storage in context The Address is assigned based on the data-type of the parameter, available register resources, and other details of the function prototype. Consumed resources are marked. This method returns a response code: - SUCCESS - indicating the Address was successfully assigned - FAIL - if the Address could not be assigned - HIDDENRET_PTRPARAM - if an additional hidden return parameter is required- Specified by:
assignAddress
in classAssignAction
- Parameters:
dt
- is the data-type of the parameter or return valueproto
- is the high-level description of the function prototypepos
- is the position of the parameter (pos>=0) or return storage (pos=-1)dtManager
- is a data-type manager for (possibly) transforming the data-typestatus
- is the resource consumption arrayres
- will hold the resulting description of the parameter- Returns:
- the response code
-
encode
Description copied from class:AssignAction
Save this action and its configuration to a stream- Specified by:
encode
in classAssignAction
- Parameters:
encoder
- is the stream encoder- Throws:
IOException
- for problems writing to the stream
-
restoreXml
Description copied from class:AssignAction
Configure any details of how this action should behave from the stream- Specified by:
restoreXml
in classAssignAction
- Parameters:
parser
- is the given stream decoder- Throws:
XmlParseException
- is there are problems decoding the stream
-