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.StringBuilderbuildXML()intcompareTo(SequenceNumber sq)booleanequals(java.lang.Object o)intgetOrder()Get relative position information of PcodeOps within a basic block, may change as basic block is edited.AddressgetTarget()intgetTime()Get unique Sub-address for distinguishing multiple PcodeOps at one instruction address.inthashCode()static SequenceNumberreadXML(XmlPullParser parser, AddressFactory factory)Create a new Sequence number from XML SAX tree element.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.java.lang.StringtoString()
-
-
-
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:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(SequenceNumber sq)
- Specified by:
compareToin 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:
el- SAX tree elementfactory- pcode factory used to create new pcode- Returns:
- new sequence number
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-