Package ghidra.program.model.lang

# Class ParamEntry

java.lang.Object
ghidra.program.model.lang.ParamEntry

public class ParamEntry extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ParamEntry(int grp)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `containedBy(Address addr, int sz)`
  Is this ParamEntry, as a memory range, contained by the given memory range.
  `boolean`
  `contains(ParamEntry otherEntry)`
  Does this ParamEntry contain another entry (as a subpiece)
  `void`
  `encode(Encoder encoder)`
  `int`
  `getAddrBySlot(int slotnum, int sz, int typeAlign, ParameterPieces res)`
  Assign the storage address when allocating something of size -sz- assuming -slotnum- slots have already been assigned.
  `long`
  `getAddressBase()`
  `int`
  `getAlign()`
  `int[]`
  `getAllGroups()`
  `static StorageClass`
  `getBasicTypeClass(DataType tp)`
  `int`
  `getGroup()`
  `int`
  `getMinSize()`
  `int`
  `getSize()`
  `int`
  `getSlot(Address addr, int skip)`
  Assuming the address is contained in this entry and we -skip- to a certain byte return the slot associated with that byte
  `AddressSpace`
  `getSpace()`
  `StorageClass`
  `getType()`
  `boolean`
  `intersects(Address addr, int sz)`
  Does this ParamEntry intersect the given range in some way
  `boolean`
  `isBigEndian()`
  `boolean`
  `isEquivalent(ParamEntry obj)`
  Determine if this ParamEntry is equivalent to another instance
  `boolean`
  `isExclusion()`
  `boolean`
  `isGrouped()`
  `boolean`
  `isOverlap()`
  `boolean`
  `isReverseStack()`
  `int`
  `justifiedContain(Address addr, int sz)`
  `static int`
  `justifiedContainAddress(AddressSpace spc1, long offset1, int sz1, AddressSpace spc2, long offset2, int sz2, boolean forceleft, boolean isBigEndian)`
  Return -1 if (op2,sz2) is not properly contained in (op1,sz1) If it is contained, return the endian aware offset of (op2,sz2) I.e.
  `static void`
  `orderWithinGroup(ParamEntry entry1, ParamEntry entry2)`
  ParamEntry within a group must be distinguishable by size or by type
  `void`
  `restoreXml(XmlPullParser parser, CompilerSpec cspec, List<ParamEntry> curList, boolean grouped)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ParamEntry

    public ParamEntry(int grp)

- ## Method Details

  - ### getGroup

    public int getGroup()

  - ### getAllGroups

    public int[] getAllGroups()

  - ### getSize

    public int getSize()

  - ### getMinSize

    public int getMinSize()

  - ### getAlign

    public int getAlign()

  - ### getAddressBase

    public long getAddressBase()

  - ### getType

    public StorageClass getType()

  - ### isExclusion

    public boolean isExclusion()

  - ### isReverseStack

    public boolean isReverseStack()

  - ### isGrouped

    public boolean isGrouped()

  - ### isOverlap

    public boolean isOverlap()

  - ### isBigEndian

    public boolean isBigEndian()

  - ### getSpace

    public AddressSpace getSpace()

  - ### containedBy

    public boolean containedBy(Address addr, int sz)
    Is this ParamEntry, as a memory range, contained by the given memory range.
    Parameters:
      `addr` - is the starting address of the given memory range
      `sz` - is the number of bytes in the given memory range
    Returns:
      true if this is contained

  - ### intersects

    public boolean intersects(Address addr, int sz)
    Does this ParamEntry intersect the given range in some way
    Parameters:
      `addr` - is the starting address of the given range
      `sz` - is the number of bytes in the given range
    Returns:
      true if there is an intersection

  - ### justifiedContain

    public int justifiedContain(Address addr, int sz)

  - ### contains

    public boolean contains(ParamEntry otherEntry)
    Does this ParamEntry contain another entry (as a subpiece)
    Parameters:
      `otherEntry` - is the other entry
    Returns:
      true if this contains the other entry

  - ### getSlot

    public int getSlot(Address addr, int skip)
    Assuming the address is contained in this entry and we -skip- to a certain byte return the slot associated with that byte
    Parameters:
      `addr` - is the address to check (which MUST be contained)
      `skip` - is the number of bytes to skip
    Returns:
      the slot index

  - ### getAddrBySlot

    public int getAddrBySlot(int slotnum, int sz, int typeAlign, ParameterPieces res)
    Assign the storage address when allocating something of size -sz- assuming -slotnum- slots have already been assigned. Set the address to null if the -sz- is too small or if there are not enough slots left
    Parameters:
      `slotnum` - number of slots already assigned
      `sz` - number of bytes to being assigned
      `typeAlign` - required byte alignment for the parameter
      `res` - will hold the final storage address
    Returns:
      slotnum plus the number of slots used

  - ### encode

    public void encode(Encoder encoder) throws IOException
    Throws:
      `IOException`

  - ### restoreXml

    public void restoreXml(XmlPullParser parser, CompilerSpec cspec, List<ParamEntry> curList, boolean grouped) throws XmlParseException
    Throws:
      `XmlParseException`

  - ### isEquivalent

    public boolean isEquivalent(ParamEntry obj)
    Determine if this ParamEntry is equivalent to another instance
    Parameters:
      `obj` - is the other instance
    Returns:
      true if they are equivalent

  - ### justifiedContainAddress

    public static int justifiedContainAddress(AddressSpace spc1, long offset1, int sz1, AddressSpace spc2, long offset2, int sz2, boolean forceleft, boolean isBigEndian)
    Return -1 if (op2,sz2) is not properly contained in (op1,sz1) If it is contained, return the endian aware offset of (op2,sz2) I.e. if the least significant byte of the op2 range falls on the least significant byte of the op1 range, return 0. If it intersects the second least significant, return 1, etc.
    Parameters:
      `spc1` - the first address space
      `offset1` - the first offset
      `sz1` - size of first space
      `spc2` - the second address space
      `offset2` - is the second offset
      `sz2` - size of second space
      `forceleft` - is true if containment is forced to be on the left even for big endian
      `isBigEndian` - true if big endian
    Returns:
      the endian aware offset or -1

  - ### getBasicTypeClass

    public static StorageClass getBasicTypeClass(DataType tp)

  - ### orderWithinGroup

    public static void orderWithinGroup(ParamEntry entry1, ParamEntry entry2) throws XmlParseException
    ParamEntry within a group must be distinguishable by size or by type
    Parameters:
      `entry1` - is the first being compared
      `entry2` - is the second being compared
    Throws:
      `XmlParseException` - if the pair is not distinguishable