Package ghidra.program.model.pcode
Class SequenceNumber
- java.lang.Object
-
- ghidra.program.model.pcode.SequenceNumber
-
- All Implemented Interfaces:
java.lang.Comparable<SequenceNumber>
public class SequenceNumber extends java.lang.Object implements java.lang.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
Constructors Constructor Description SequenceNumber(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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilder
buildXML()
int
compareTo(SequenceNumber sq)
boolean
equals(java.lang.Object o)
int
getOrder()
Get relative position information of PcodeOps within a basic block, may change as basic block is edited.Address
getTarget()
int
getTime()
Get unique Sub-address for distinguishing multiple PcodeOps at one instruction address.int
hashCode()
static SequenceNumber
readXML(XmlPullParser parser, AddressFactory factory)
Create a new Sequence number from XML SAX tree element.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.java.lang.String
toString()
-
-
-
Constructor Detail
-
SequenceNumber
public SequenceNumber(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.- Parameters:
instrAddr
- address of instructionsequenceNum
- sequence of pcode op with an instructions pcode ops
-
-
Method Detail
-
getTarget
public Address 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
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(SequenceNumber sq)
- Specified by:
compareTo
in interfacejava.lang.Comparable<SequenceNumber>
-
buildXML
public java.lang.StringBuilder buildXML()
- Returns:
- Build XML tag for SequenceNumber
-
readXML
public static SequenceNumber readXML(XmlPullParser parser, AddressFactory factory)
Create a new Sequence number from XML SAX tree element.- Parameters:
parser
- the xml parserfactory
- pcode factory used to create new pcode- Returns:
- new sequence number
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-