Ghidra 11.3.2
Ghidra internal decompiler documentation.
|
Consume a register per primitive member of an aggregate data-type. More...
#include <modelrules.hh>
Public Member Functions | |
MultiMemberAssign (type_class store, bool stack, bool mostSig, 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 bool | fillinOutputMap (ParamActive *active) const |
Test if this action could produce return value storage matching the given set of trials. | |
virtual void | decode (Decoder &decoder) |
Configure any details of how this action should behave from the stream. | |
![]() | |
AssignAction (const ParamListStandard *res) | |
Constructor. | |
bool | canAffectFillinOutput (void) const |
Return true if fillinOutputMap is active. | |
Private Attributes | |
type_class | resourceType |
Resource list from which to consume. | |
bool | consumeFromStack |
True if resources should be consumed from the stack. | |
bool | consumeMostSig |
True if resources are consumed starting with most significant bytes. | |
Additional Inherited Members | |
![]() | |
enum | { success , fail , no_assignment , hiddenret_ptrparam , hiddenret_specialreg , hiddenret_specialreg_void } |
![]() | |
static AssignAction * | decodeAction (Decoder &decoder, const ParamListStandard *res) |
Read the next model rule action element from the stream. | |
static AssignAction * | decodeSideeffect (Decoder &decoder, const ParamListStandard *res) |
Read the next model rule sideeffect element from the stream. | |
![]() | |
const ParamListStandard * | resource |
Resources to which this action applies. | |
bool | fillinOutputActive |
If true, fillinOutputMap is active. | |
Consume a register per primitive member of an aggregate data-type.
The data-type is split up into its underlying primitive elements, and each one is assigned a register from the specific resource list. There must be no padding between elements. No packing of elements into a single register occurs.
|
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, ghidra::ParamListStandard::assignAddressFallback(), consumeFromStack, consumeMostSig, ghidra::PrimitiveExtractor::containsHoles(), ghidra::PrimitiveExtractor::containsUnknown(), ghidra::PrimitiveExtractor::Primitive::dt, ghidra::AssignAction::fail, ghidra::AddrSpaceManager::findAddJoin(), ghidra::ParameterPieces::flags, ghidra::PrimitiveExtractor::get(), ghidra::VarnodeData::getAddr(), ghidra::TypeFactory::getArch(), ghidra::Address::getOffset(), ghidra::Datatype::getSize(), ghidra::Address::getSpace(), ghidra::JoinRecord::getUnified(), ghidra::PrimitiveExtractor::isAligned(), ghidra::PrimitiveExtractor::isValid(), ghidra::AssignAction::resource, resourceType, ghidra::PrimitiveExtractor::size(), ghidra::AssignAction::success, and ghidra::ParameterPieces::type.
|
inlinevirtual |
Make a copy of this action.
newResource | is the new resource object that will own the clone |
Implements ghidra::AssignAction.
References consumeFromStack, consumeMostSig, and resourceType.
|
virtual |
Configure any details of how this action should behave from the stream.
decoder | is the given stream decoder |
Implements ghidra::AssignAction.
References ghidra::Decoder::closeElement(), ghidra::Decoder::getNextAttributeId(), ghidra::Decoder::openElement(), ghidra::Decoder::readString(), and resourceType.
|
virtual |
Test if this action could produce return value storage matching the given set of trials.
If there is a return value data-type that could be assigned storage matching the trials by this action, return true. The trials have their matching ParamEntry and offset already set and are already sorted.
active | is the given set of trials |
Reimplemented from ghidra::AssignAction.
References ghidra::ParamTrial::getEntry(), ghidra::ParamEntry::getGroup(), ghidra::ParamActive::getNumTrials(), ghidra::ParamTrial::getOffset(), ghidra::ParamActive::getTrial(), ghidra::ParamEntry::getType(), ghidra::ParamEntry::isFirstInClass(), and resourceType.