Class Constructor
- java.lang.Object
-
- ghidra.app.plugin.processors.sleigh.Constructor
-
- All Implemented Interfaces:
java.lang.Comparable<Constructor>
public class Constructor extends java.lang.Object implements java.lang.Comparable<Constructor>
The primary sleigh concept representing a semantic action taking operands (semantic values) as input producing a semantic value as output matching a particular pattern printing in a certain way
-
-
Constructor Summary
Constructors Constructor Description Constructor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyContext(ParserWalker walker, SleighDebugLogger debug)
Apply any operations on context for this Constructor to a particular InstructionContextint
compareTo(Constructor that)
boolean
equals(java.lang.Object obj)
java.util.List<ContextChange>
getContextChanges()
int
getFlowthruIndex()
int
getId()
int
getLineno()
int
getMinimumLength()
ConstructTpl
getNamedTempl(int secnum)
Retrieve a named p-code template sectionint
getNumOperands()
OperandSymbol
getOperand(int i)
int[]
getOpsPrintOrder()
Return the indices of the operands in an array in the order they are printed (after the first white space)SubtableSymbol
getParent()
java.util.List<java.lang.String>
getPrintPieces()
ConstructTpl
getTempl()
int
hashCode()
java.lang.String
print(ParserWalker walker)
java.lang.String
printBody(ParserWalker walker)
void
printList(ParserWalker walker, java.util.ArrayList<java.lang.Object> list)
java.lang.String
printMnemonic(ParserWalker walker)
java.lang.String
printSeparator(int separatorIndex)
void
restoreXml(XmlPullParser parser, SleighLanguage sleigh)
void
setId(int val)
java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getPrintPieces
public java.util.List<java.lang.String> getPrintPieces()
-
getFlowthruIndex
public int getFlowthruIndex()
-
getMinimumLength
public int getMinimumLength()
-
setId
public void setId(int val)
-
getId
public int getId()
-
getLineno
public int getLineno()
-
getParent
public SubtableSymbol getParent()
-
getNumOperands
public int getNumOperands()
-
getOperand
public OperandSymbol getOperand(int i)
-
getTempl
public ConstructTpl getTempl()
-
getContextChanges
public java.util.List<ContextChange> getContextChanges()
-
print
public java.lang.String print(ParserWalker walker) throws MemoryAccessException
- Throws:
MemoryAccessException
-
printSeparator
public java.lang.String printSeparator(int separatorIndex)
-
printList
public void printList(ParserWalker walker, java.util.ArrayList<java.lang.Object> list) throws MemoryAccessException
- Throws:
MemoryAccessException
-
printMnemonic
public java.lang.String printMnemonic(ParserWalker walker) throws MemoryAccessException
- Throws:
MemoryAccessException
-
printBody
public java.lang.String printBody(ParserWalker walker) throws MemoryAccessException
- Throws:
MemoryAccessException
-
applyContext
public void applyContext(ParserWalker walker, SleighDebugLogger debug) throws MemoryAccessException
Apply any operations on context for this Constructor to a particular InstructionContext- Parameters:
pos
-- Throws:
MemoryAccessException
-
getNamedTempl
public ConstructTpl getNamedTempl(int secnum)
Retrieve a named p-code template section- Parameters:
secnum
- is the id of the section to return- Returns:
- the named section (or null)
-
restoreXml
public void restoreXml(XmlPullParser parser, SleighLanguage sleigh) throws UnknownInstructionException
- Throws:
UnknownInstructionException
-
getOpsPrintOrder
public int[] getOpsPrintOrder()
Return the indices of the operands in an array in the order they are printed (after the first white space)- Returns:
- array of operand indices
-
compareTo
public int compareTo(Constructor that)
- Specified by:
compareTo
in interfacejava.lang.Comparable<Constructor>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-