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 voidapplyContext(ParserWalker walker, SleighDebugLogger debug)Apply any operations on context for this Constructor to a particular InstructionContextintcompareTo(Constructor that)booleanequals(java.lang.Object obj)java.util.List<ContextChange>getContextChanges()intgetFlowthruIndex()intgetId()intgetLineno()intgetMinimumLength()ConstructTplgetNamedTempl(int secnum)Retrieve a named p-code template sectionintgetNumOperands()OperandSymbolgetOperand(int i)int[]getOpsPrintOrder()Return the indices of the operands in an array in the order they are printed (after the first white space)SubtableSymbolgetParent()java.util.List<java.lang.String>getPrintPieces()java.lang.StringgetSourceFile()Returns the source fileConstructTplgetTempl()inthashCode()java.lang.Stringprint(ParserWalker walker)java.lang.StringprintBody(ParserWalker walker)voidprintList(ParserWalker walker, java.util.ArrayList<java.lang.Object> list)java.lang.StringprintMnemonic(ParserWalker walker)java.lang.StringprintSeparator(int separatorIndex)voidrestoreXml(XmlPullParser parser, SleighLanguage sleigh)voidsetId(int val)java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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:
walker- the parser walkerdebug- the debug logger- Throws:
MemoryAccessException- if the context failed to be applied.
-
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:
compareToin interfacejava.lang.Comparable<Constructor>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getSourceFile
public java.lang.String getSourceFile()
Returns the source file- Returns:
- source file
-
-