Package ghidra.program.model.lang
Interface ParamList
-
- All Known Implementing Classes:
ParamListRegisterOut
,ParamListStandard
,ParamListStandardOut
public interface ParamList
A group of ParamEntry that form a complete set for passing parameters (in one direction)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ParamList.WithSlotRec
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
assignMap(Program prog, DataType[] proto, java.util.ArrayList<VariableStorage> res, boolean addAutoParams)
Given a list of datatypes, calculate the storage locations used for passing those datatypesVariableStorage[]
getPotentialRegisterStorage(Program prog)
Get a list of all parameter storage locations consisting of a single registerint
getStackParameterAlignment()
Return the amount of alignment used for parameters passed on the stack, or -1 if there are no stack paramsjava.lang.Long
getStackParameterOffset()
Find 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 stackboolean
isThisBeforeRetPointer()
boolean
possibleParamWithSlot(Address loc, int size, ParamList.WithSlotRec res)
Determine if a particular address range is a possible parameter, and if so what slot(s) it occupiesvoid
restoreXml(XmlPullParser parser, CompilerSpec cspec)
void
saveXml(java.lang.StringBuilder buffer, boolean isInput)
-
-
-
Method Detail
-
assignMap
void assignMap(Program prog, DataType[] proto, java.util.ArrayList<VariableStorage> res, boolean addAutoParams)
Given a list of datatypes, calculate the storage locations used for passing those datatypes- Parameters:
prog
- is the active prograproto
- is the list of datatypesres
- is the vector for holding the VariableStorage corresponding to datatypesaddAutoParams
- if true add/process auto-parameters
-
saveXml
void saveXml(java.lang.StringBuilder buffer, boolean isInput)
-
restoreXml
void restoreXml(XmlPullParser parser, CompilerSpec cspec) throws XmlParseException
- Throws:
XmlParseException
-
getPotentialRegisterStorage
VariableStorage[] getPotentialRegisterStorage(Program prog)
Get a list of all parameter storage locations consisting of a single register- Parameters:
prog
- is the controlling program- Returns:
- an array of VariableStorage
-
getStackParameterAlignment
int getStackParameterAlignment()
Return the amount of alignment used for parameters passed on the stack, or -1 if there are no stack params- Returns:
- the alignment
-
getStackParameterOffset
java.lang.Long getStackParameterOffset()
Find 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- Returns:
- the boundary offset
-
possibleParamWithSlot
boolean possibleParamWithSlot(Address loc, int size, ParamList.WithSlotRec res)
Determine if a particular address range is a possible parameter, and if so what slot(s) it occupies- 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
-
isThisBeforeRetPointer
boolean isThisBeforeRetPointer()
-
-