Package ghidra.program.model.lang
Class ParamListStandard
java.lang.Object
ghidra.program.model.lang.ParamListStandard
- All Implemented Interfaces:
ParamList
- Direct Known Subclasses:
ParamListRegisterOut
Standard analysis for parameter lists
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.program.model.lang.ParamList
ParamList.WithSlotRec -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ParamEntry[]protected intprotected intprotected AddressSpaceprotected booleanprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected VariableStorageassignAddress(Program program, DataType tp, int[] status, boolean ishiddenret, boolean isindirect) Assign next available memory chunk to typevoidassignMap(Program prog, DataType[] proto, ArrayList<VariableStorage> res, boolean addAutoParams) Given a list of datatypes, calculate the storage locations used for passing those datatypesvoidGet a list of all parameter storage locations consisting of a single registerintReturn the amount of alignment used for parameters passed on the stack, or -1 if there are no stack paramsFind the boundary offset that separates parameters on the stack from other local variables This is usually the address of the first stack parameter, but if the stack grows positive, this is the first address AFTER the parameters on the stackbooleanisEquivalent(ParamList obj) Determine if this ParmList is equivalent to another instancebooleanbooleanpossibleParamWithSlot(Address loc, int size, ParamList.WithSlotRec res) Determine if a particular address range is a possible parameter, and if so what slot(s) it occupiesvoidrestoreXml(XmlPullParser parser, CompilerSpec cspec)
-
Field Details
-
numgroup
protected int numgroup -
pointermax
protected int pointermax -
thisbeforeret
protected boolean thisbeforeret -
splitMetatype
protected boolean splitMetatype -
entry
-
spacebase
-
-
Constructor Details
-
ParamListStandard
public ParamListStandard()
-
-
Method Details
-
assignAddress
protected VariableStorage assignAddress(Program program, DataType tp, int[] status, boolean ishiddenret, boolean isindirect) Assign next available memory chunk to type- Parameters:
program- is the Programtp- type being assigned storagestatus- status from previous assignmentsishiddenret- is true if the parameter is a hidden return valueisindirect- is true if parameter is really a pointer to the real parameter value- Returns:
- Address of assigned memory chunk
-
assignMap
public void assignMap(Program prog, DataType[] proto, ArrayList<VariableStorage> res, boolean addAutoParams) Description copied from interface:ParamListGiven a list of datatypes, calculate the storage locations used for passing those datatypes -
getPotentialRegisterStorage
Description copied from interface:ParamListGet a list of all parameter storage locations consisting of a single register- Specified by:
getPotentialRegisterStoragein interfaceParamList- Parameters:
prog- is the controlling program- Returns:
- an array of VariableStorage
-
encode
- Specified by:
encodein interfaceParamList- Throws:
IOException
-
restoreXml
- Specified by:
restoreXmlin interfaceParamList- Throws:
XmlParseException
-
getStackParameterAlignment
public int getStackParameterAlignment()Description copied from interface:ParamListReturn the amount of alignment used for parameters passed on the stack, or -1 if there are no stack params- Specified by:
getStackParameterAlignmentin interfaceParamList- Returns:
- the alignment
-
getStackParameterOffset
Description copied from interface:ParamListFind the boundary offset that separates parameters on the stack from other local variables This is usually the address of the first stack parameter, but if the stack grows positive, this is the first address AFTER the parameters on the stack- Specified by:
getStackParameterOffsetin interfaceParamList- Returns:
- the boundary offset
-
possibleParamWithSlot
Description copied from interface:ParamListDetermine if a particular address range is a possible parameter, and if so what slot(s) it occupies- Specified by:
possibleParamWithSlotin interfaceParamList- Parameters:
loc- is the starting address of the rangesize- is the size of the range in bytesres- holds the resulting slot and slotsize- Returns:
- true if the range is a possible parameter
-
isEquivalent
Description copied from interface:ParamListDetermine if this ParmList is equivalent to another instance- Specified by:
isEquivalentin interfaceParamList- Parameters:
obj- is the other instance- Returns:
- true if they are equivalent
-
isThisBeforeRetPointer
public boolean isThisBeforeRetPointer()- Specified by:
isThisBeforeRetPointerin interfaceParamList
-