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
ConstructorDescriptionSequenceNumber
(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 TypeMethodDescriptionint
static SequenceNumber
Decode a new Sequence number from the streamvoid
Encode this sequence number to the streamboolean
int
getOrder()
Get relative position information of PcodeOps within a basic block, may change as basic block is edited.int
getTime()
Get unique Sub-address for distinguishing multiple PcodeOps at one instruction address.int
hashCode()
void
setOrder
(int o) Set relative position information of PcodeOps within a basic block, may change as basic block is edited.void
setTime
(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:
compareTo
in 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()
-