Class ParamEntry


  • public class ParamEntry
    extends java.lang.Object
    • Constructor Detail

      • ParamEntry

        public ParamEntry​(int grp)
    • Method Detail

      • getGroup

        public int getGroup()
      • getGroupSize

        public int getGroupSize()
      • getSize

        public int getSize()
      • getMinSize

        public int getMinSize()
      • getAlign

        public int getAlign()
      • getAddressBase

        public long getAddressBase()
      • getType

        public int getType()
      • isExclusion

        public boolean isExclusion()
      • isReverseStack

        public boolean isReverseStack()
      • isGrouped

        public boolean isGrouped()
      • isBigEndian

        public boolean isBigEndian()
      • isFloatExtended

        public boolean isFloatExtended()
      • isNonOverlappingJoin

        public boolean isNonOverlappingJoin()
        Returns:
        true if at least one piece of a join doesn't overlap with another ParamEntry
      • getJoinRecord

        public Varnode[] getJoinRecord()
      • contains

        public boolean contains​(ParamEntry op2)
      • justifiedContain

        public int justifiedContain​(Address addr,
                                    int sz)
      • 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,
                                 VarnodeData res)
        Return the storage address assigned when allocating something of size -sz- assuming -slotnum- slots have already been assigned. Set res.space 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
        res - the final storage address
        Returns:
        slotnum plus the number of slots used
      • countJoinOverlap

        public int countJoinOverlap​(java.util.List<ParamEntry> curList)
      • saveXml

        public void saveXml​(java.lang.StringBuilder buffer)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • unsignedCompare

        public static boolean unsignedCompare​(long a,
                                              long b)
        Unsigned less-than operation
        Parameters:
        a - is the first operand
        b - is the second operand
        Returns:
        return true is a is less than b, where a and b are interpreted as unsigned integers
      • 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
      • getMetatype

        public static int getMetatype​(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