Class ParamListStandard

java.lang.Object
ghidra.program.model.lang.ParamListStandard
All Implemented Interfaces:
ParamList
Direct Known Subclasses:
ParamListRegisterOut

public class ParamListStandard extends Object implements ParamList
Standard analysis for parameter lists
  • Field Details

    • numgroup

      protected int numgroup
    • pointermax

      protected int pointermax
    • thisbeforeret

      protected boolean thisbeforeret
    • splitMetatype

      protected boolean splitMetatype
    • entry

      protected ParamEntry[] entry
    • spacebase

      protected AddressSpace 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 Program
      tp - type being assigned storage
      status - status from previous assignments
      ishiddenret - is true if the parameter is a hidden return value
      isindirect - 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: ParamList
      Given a list of datatypes, calculate the storage locations used for passing those datatypes
      Specified by:
      assignMap in interface ParamList
      Parameters:
      prog - is the active program
      proto - is the list of datatypes
      res - is the vector for holding the VariableStorage corresponding to datatypes
      addAutoParams - if true add/process auto-parameters
    • getPotentialRegisterStorage

      public VariableStorage[] getPotentialRegisterStorage(Program prog)
      Description copied from interface: ParamList
      Get a list of all parameter storage locations consisting of a single register
      Specified by:
      getPotentialRegisterStorage in interface ParamList
      Parameters:
      prog - is the controlling program
      Returns:
      an array of VariableStorage
    • encode

      public void encode(Encoder encoder, boolean isInput) throws IOException
      Specified by:
      encode in interface ParamList
      Throws:
      IOException
    • restoreXml

      public void restoreXml(XmlPullParser parser, CompilerSpec cspec) throws XmlParseException
      Specified by:
      restoreXml in interface ParamList
      Throws:
      XmlParseException
    • getStackParameterAlignment

      public int getStackParameterAlignment()
      Description copied from interface: ParamList
      Return the amount of alignment used for parameters passed on the stack, or -1 if there are no stack params
      Specified by:
      getStackParameterAlignment in interface ParamList
      Returns:
      the alignment
    • getStackParameterOffset

      public Long getStackParameterOffset()
      Description copied from interface: ParamList
      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
      Specified by:
      getStackParameterOffset in interface ParamList
      Returns:
      the boundary offset
    • possibleParamWithSlot

      public boolean possibleParamWithSlot(Address loc, int size, ParamList.WithSlotRec res)
      Description copied from interface: ParamList
      Determine if a particular address range is a possible parameter, and if so what slot(s) it occupies
      Specified by:
      possibleParamWithSlot in interface ParamList
      Parameters:
      loc - is the starting address of the range
      size - is the size of the range in bytes
      res - holds the resulting slot and slotsize
      Returns:
      true if the range is a possible parameter
    • isEquivalent

      public boolean isEquivalent(ParamList obj)
      Description copied from interface: ParamList
      Determine if this ParmList is equivalent to another instance
      Specified by:
      isEquivalent in interface ParamList
      Parameters:
      obj - is the other instance
      Returns:
      true if they are equivalent
    • isThisBeforeRetPointer

      public boolean isThisBeforeRetPointer()
      Specified by:
      isThisBeforeRetPointer in interface ParamList