Package ghidra.program.model.correlate
Class InstructHash
- java.lang.Object
-
- ghidra.program.model.correlate.InstructHash
-
public class InstructHash extends java.lang.ObjectThis 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 Change Modifier and Type Field Description NEW protected BlockblockNEW protected java.util.Hashtable<Hash,HashEntry>hashEntriesNEW protected intindexNEW protected InstructioninstructionNEW protected booleanisMatchedNEW protected Hash[]nGrams
-
Constructor Summary
Constructors Change 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 Change Modifier and Type Method Description booleanallUnknown(int length)If the -length- instructions, starting with this, are all unmatched, return true;NEW protected voidclearNGrams(int sz)Clear out the n-gram array to an uninitialized listNEW protected voidclearSort()Clear out structures associated with the main sortBlockgetBlock()
-
-
-
Field Detail
-
block NEW
protected Block block
-
instruction NEW
protected Instruction instruction
-
nGrams NEW
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
-
-