Package ghidra.program.model.correlate
Class InstructHash
- java.lang.Object
-
- ghidra.program.model.correlate.InstructHash
-
public class InstructHash extends java.lang.Object
This class is the container for hashing information about a particular instruction, including all the n-grams it is currently involved in within the HashStore.
-
-
Field Summary
Fields Modifier and Type Field Description protected Block
block
protected java.util.Hashtable<Hash,HashEntry>
hashEntries
protected int
index
protected Instruction
instruction
protected boolean
isMatched
protected Hash[]
nGrams
-
Constructor Summary
Constructors Constructor Description InstructHash(Instruction inst, Block bl, int ind)
Build an (unmatched) Instruction, associating it with its position in the basic block
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allUnknown(int length)
If the -length- instructions, starting with this, are all unmatched, return true;protected void
clearNGrams(int sz)
Clear out the n-gram array to an uninitialized listprotected void
clearSort()
Clear out structures associated with the main sortBlock
getBlock()
-
-
-
Field Detail
-
isMatched
protected boolean isMatched
-
index
protected int index
-
block
protected Block block
-
instruction
protected Instruction instruction
-
nGrams
protected Hash[] nGrams
-
-
Constructor Detail
-
InstructHash
public InstructHash(Instruction inst, Block bl, int ind)
Build an (unmatched) Instruction, associating it with its position in the basic block- Parameters:
inst
- is the underlying instructionbl
- is the basic-blockind
- is the index within the block
-
-
Method Detail
-
getBlock
public Block getBlock()
- Returns:
- the containing basic block
-
allUnknown
public boolean allUnknown(int length)
If the -length- instructions, starting with this, are all unmatched, return true;- Parameters:
length
- is number of instructions to check- Returns:
- true if all checked instructions are unmatched
-
clearSort
protected void clearSort()
Clear out structures associated with the main sort
-
clearNGrams
protected void clearNGrams(int sz)
Clear out the n-gram array to an uninitialized list- Parameters:
sz
- is the size of the uninitialized list
-
-