Package ghidra.program.model.lang
Class ParamEntry
- java.lang.Object
-
- ghidra.program.model.lang.ParamEntry
-
public class ParamEntry extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
TYPE_FLOAT
static int
TYPE_PTR
static int
TYPE_UNKNOWN
-
Constructor Summary
Constructors Constructor Description ParamEntry(int grp)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(ParamEntry op2)
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.long
getAddressBase()
int
getAlign()
int
getGroup()
int
getGroupSize()
Varnode[]
getJoinRecord()
static int
getMetatype(DataType tp)
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 byteAddressSpace
getSpace()
int
getType()
boolean
isBigEndian()
boolean
isExclusion()
boolean
isFloatExtended()
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.void
restoreXml(XmlPullParser parser, CompilerSpec cspec, boolean normalstack)
static boolean
unsignedCompare(long a, long b)
Unsigned less-than operation
-
-
-
Field Detail
-
TYPE_UNKNOWN
public static final int TYPE_UNKNOWN
- See Also:
- Constant Field Values
-
TYPE_PTR
public static final int TYPE_PTR
- See Also:
- Constant Field Values
-
TYPE_FLOAT
public static final int TYPE_FLOAT
- See Also:
- Constant Field Values
-
-
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()
-
isBigEndian
public boolean isBigEndian()
-
isFloatExtended
public boolean isFloatExtended()
-
getSpace
public AddressSpace getSpace()
-
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 assignedsz
- number of bytes to being assignedres
- the final storage address- Returns:
- slotnum plus the number of slots used
-
restoreXml
public void restoreXml(XmlPullParser parser, CompilerSpec cspec, boolean normalstack) throws XmlParseException
- Throws:
XmlParseException
-
unsignedCompare
public static boolean unsignedCompare(long a, long b)
Unsigned less-than operation- Parameters:
a
-b
-- 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:
op1
- base address of first rangesz1
- size of first rangeop2
- base address of second rangesz2
- size of second rangeforceleft
- is true if containment is forced to be on the left even for big endian- Returns:
- the endian aware offset or -1
-
getMetatype
public static int getMetatype(DataType tp)
-
-