decompiler 1.0.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ghidra::GotoStack Class Reference

Action assigning a parameter Address from the next available stack location. More...

#include <modelrules.hh>

Inheritance diagram for ghidra::GotoStack:
ghidra::AssignAction

Public Member Functions

 GotoStack (const ParamListStandard *res, int4 val)
 Constructor for use with decode. More...
 
 GotoStack (const ParamListStandard *res)
 Constructor for use with decode()
 
virtual AssignActionclone (const ParamListStandard *newResource) const
 Make a copy of this action. More...
 
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. More...
 
virtual void decode (Decoder &decoder)
 Configure any details of how this action should behave from the stream. More...
 
- Public Member Functions inherited from ghidra::AssignAction
 AssignAction (const ParamListStandard *res)
 Constructor.
 
virtual AssignActionclone (const ParamListStandard *newResource) const =0
 Make a copy of this action. More...
 
virtual uint4 assignAddress (Datatype *dt, const PrototypePieces &proto, int4 pos, TypeFactory &tlist, vector< int4 > &status, ParameterPieces &res) const =0
 Assign an address and other meta-data for a specific parameter or for return storage in context. More...
 
virtual void decode (Decoder &decoder)=0
 Configure any details of how this action should behave from the stream. More...
 

Private Member Functions

void initializeEntry (void)
 Find stack entry in resource list.
 

Private Attributes

const ParamEntrystackEntry
 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 AssignActiondecodeAction (Decoder &decoder, const ParamListStandard *res)
 Read the next model rule action element from the stream. More...
 
static AssignActiondecodeSideeffect (Decoder &decoder, const ParamListStandard *res)
 Read the next model rule sideeffect element from the stream. More...
 
- Protected Attributes inherited from ghidra::AssignAction
const ParamListStandardresource
 Resources to which this action applies.
 

Detailed Description

Action assigning a parameter Address from the next available stack location.

Constructor & Destructor Documentation

◆ GotoStack()

ghidra::GotoStack::GotoStack ( const ParamListStandard res,
int4  val 
)

Constructor for use with decode.

Parameters
resis the new resource set to associate with this action
valis a dummy value

References stackEntry.

Referenced by clone().

Member Function Documentation

◆ assignAddress()

uint4 ghidra::GotoStack::assignAddress ( Datatype dt,
const PrototypePieces proto,
int4  pos,
TypeFactory tlist,
vector< int4 > &  status,
ParameterPieces res 
) const
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:

  • 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
Parameters
dtis the data-type of the parameter or return value
protois the high-level description of the function prototype
posis the position of the parameter (pos>=0) or return storage (pos=-1)
tlistis a data-type factory for (possibly) transforming the data-type
statusis the resource consumption array
reswill hold the resulting description of the parameter
Returns
the response code

Implements ghidra::AssignAction.

References ghidra::ParameterPieces::addr, ghidra::ParameterPieces::flags, ghidra::ParamEntry::getAddrBySlot(), ghidra::Datatype::getAlignment(), ghidra::ParamEntry::getGroup(), ghidra::Datatype::getSize(), stackEntry, ghidra::AssignAction::success, and ghidra::ParameterPieces::type.

◆ clone()

virtual AssignAction * ghidra::GotoStack::clone ( const ParamListStandard newResource) const
inlinevirtual

Make a copy of this action.

Parameters
newResourceis the new resource object that will own the clone
Returns
the newly allocated copy

Implements ghidra::AssignAction.

References GotoStack().

◆ decode()

void ghidra::GotoStack::decode ( Decoder decoder)
virtual

Configure any details of how this action should behave from the stream.

Parameters
decoderis the given stream decoder

Implements ghidra::AssignAction.

References ghidra::Decoder::closeElement(), initializeEntry(), and ghidra::Decoder::openElement().


The documentation for this class was generated from the following files: