|
decompiler 1.0.0
|
Consume stack resources as a side-effect. More...
#include <modelrules.hh>
Public Member Functions | |
| ExtraStack (const ParamListStandard *res) | |
| Constructor for use with decode. | |
| ExtraStack (type_class storage, int4 offset, const ParamListStandard *res) | |
| Constructor. | |
| virtual AssignAction * | clone (const ParamListStandard *newResource) const |
| Make a copy of this action. | |
| virtual uint4 | assignAddress (Datatype *dt, const PrototypePieces &proto, int4 pos, TypeFactory &tlist, vector< int4 > &status, ParameterPieces &res) const |
| Assign an address and other meta-data for a specific parameter or for return storage in context. | |
| virtual void | decode (Decoder &decoder) |
| Configure any details of how this action should behave from the stream. | |
Public Member Functions inherited from ghidra::AssignAction | |
| AssignAction (const ParamListStandard *res) | |
| Constructor. | |
| bool | canAffectFillinOutput (void) const |
| Return true if fillinOutputMap is active. | |
| virtual bool | fillinOutputMap (ParamActive *active) const |
| Test if this action could produce return value storage matching the given set of trials. | |
Private Member Functions | |
| void | initializeEntry (void) |
| Find stack entry in resource list. | |
Private Attributes | |
| int4 | afterBytes |
| Activate side effect after given number of bytes consumed. | |
| type_class | afterStorage |
| Activate side effect after given amount of this storage consumed. | |
| const ParamEntry * | stackEntry |
| Parameter Entry corresponding to the stack. | |
Additional Inherited Members | |
Public Types inherited from ghidra::AssignAction | |
| enum | { success , fail , no_assignment , hiddenret_ptrparam , hiddenret_specialreg , hiddenret_specialreg_void } |
Static Public Member Functions inherited from ghidra::AssignAction | |
| static AssignAction * | decodeAction (Decoder &decoder, const ParamListStandard *res) |
| Read the next model rule action element from the stream. | |
| static AssignAction * | decodePrecondition (Decoder &decoder, const ParamListStandard *res) |
| Read the next model rule precondition element from the stream. | |
| static AssignAction * | decodeSideeffect (Decoder &decoder, const ParamListStandard *res) |
| Read the next model rule sideeffect element from the stream. | |
| static void | justifyPieces (vector< VarnodeData > &pieces, int4 offset, bool isBigEndian, bool consumeMostSig, bool justifyRight) |
| Truncate a tiling by a given number of bytes. | |
Protected Attributes inherited from ghidra::AssignAction | |
| const ParamListStandard * | resource |
| Resources to which this action applies. | |
| bool | fillinOutputActive |
| If true, fillinOutputMap is active. | |
Consume stack resources as a side-effect.
This action is a side-effect and doesn't assign an address for the current parameter. If the current parameter has been assigned a address that is not on the stack, this action consumes stack resources as if the parameter were allocated to the stack. If the current parameter was already assigned a stack address, no additional action is taken.
| ghidra::ExtraStack::ExtraStack | ( | const ParamListStandard * | res | ) |
Constructor for use with decode.
| res | is the new resource set to associate with this action |
References afterBytes, afterStorage, stackEntry, and ghidra::TYPECLASS_GENERAL.
|
virtual |
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:
| dt | is the data-type of the parameter or return value |
| proto | is the high-level description of the function prototype |
| pos | is the position of the parameter (pos>=0) or return storage (pos=-1) |
| tlist | is a data-type factory for (possibly) transforming the data-type |
| status | is the resource consumption array |
| res | will hold the resulting description of the parameter |
Implements ghidra::AssignAction.
References ghidra::ParameterPieces::addr, afterBytes, afterStorage, ghidra::ParamEntry::getAddrBySlot(), ghidra::Datatype::getAlignment(), ghidra::ParamListStandard::getEntry(), ghidra::ParamEntry::getGroup(), ghidra::ParamEntry::getSize(), ghidra::Datatype::getSize(), ghidra::Address::getSpace(), ghidra::ParamEntry::getSpace(), ghidra::ParamEntry::getType(), ghidra::AssignAction::resource, stackEntry, and ghidra::AssignAction::success.
|
inlinevirtual |
Make a copy of this action.
| newResource | is the new resource object that will own the clone |
Implements ghidra::AssignAction.
References afterBytes, and afterStorage.
|
virtual |
Configure any details of how this action should behave from the stream.
| decoder | is the given stream decoder |
Implements ghidra::AssignAction.
References afterBytes, afterStorage, ghidra::Decoder::closeElement(), ghidra::Decoder::getNextAttributeId(), initializeEntry(), ghidra::Decoder::openElement(), ghidra::Decoder::readString(), and ghidra::Decoder::readUnsignedInteger().