Package ghidra.program.model.pcode
Class SequenceNumber
java.lang.Object
ghidra.program.model.pcode.SequenceNumber
- All Implemented Interfaces:
Comparable<SequenceNumber>
Basically a unique address for a PcodeOp
It is unique, maintains original assembly instruction address, and is comparable
within a basic block
-
Constructor Summary
ConstructorsConstructorDescriptionSequenceNumber(Address instrAddr, int sequenceNum) Construct a sequence number for an instruction at an address and sequence of pcode op within that instructions set of pcode. -
Method Summary
Modifier and TypeMethodDescriptionintstatic SequenceNumberDecode a new Sequence number from the streamvoidEncode this sequence number to the streambooleanintgetOrder()Get relative position information of PcodeOps within a basic block, may change as basic block is edited.intgetTime()Get unique Sub-address for distinguishing multiple PcodeOps at one instruction address.inthashCode()voidsetOrder(int o) Set relative position information of PcodeOps within a basic block, may change as basic block is edited.voidsetTime(int t) Set unique Sub-address for distinguishing multiple PcodeOps at one instruction address.toString()
-
Constructor Details
-
SequenceNumber
Construct a sequence number for an instruction at an address and sequence of pcode op within that instructions set of pcode.- Parameters:
instrAddr- address of instructionsequenceNum- sequence of pcode op with an instructions pcode ops
-
-
Method Details
-
getTarget
- Returns:
- get address of instruction this sequence belongs to
-
getTime
public int getTime()Get unique Sub-address for distinguishing multiple PcodeOps at one instruction address. Does not change over lifetime of PcodeOp- Returns:
- unique id for a pcode op within a given instruction
-
setTime
public void setTime(int t) Set unique Sub-address for distinguishing multiple PcodeOps at one instruction address. Does not change over lifetime of PcodeOp- Parameters:
t- unique id
-
getOrder
public int getOrder()Get relative position information of PcodeOps within a basic block, may change as basic block is edited.- Returns:
- relative position of pcode in a basic block
-
setOrder
public void setOrder(int o) Set relative position information of PcodeOps within a basic block, may change as basic block is edited.- Parameters:
o- relative position of pcodeOp within a basic block
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<SequenceNumber>
-
encode
Encode this sequence number to the stream- Parameters:
encoder- is the stream encoder- Throws:
IOException- for errors in the underlying stream
-
decode
Decode a new Sequence number from the stream- Parameters:
decoder- is the stream decoder- Returns:
- new sequence number
- Throws:
DecoderException- for an invalid encoding
-
toString
-
hashCode
public int hashCode()
-