Package ghidra.program.model.correlate
Class DisambiguateByParentWithOrder
java.lang.Object
ghidra.program.model.correlate.DisambiguateByParentWithOrder
- All Implemented Interfaces:
DisambiguateStrategy
Attempt to disambiguate similar n-grams by looking at the parents, AND siblings, of blocks containing the n-grams.
This addresses switch constructions in particular, where code for individual cases look very similar but can be
distinguished by the ordering of the cases.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncalcHashes
(InstructHash instHash, int matchSize, HashStore store) Generate (possibly multiple) hashes that can be used to disambiguate an n-gram and its block from other blocks with similar instructions.
-
Constructor Details
-
DisambiguateByParentWithOrder
public DisambiguateByParentWithOrder()
-
-
Method Details
-
calcHashes
public ArrayList<Hash> calcHashes(InstructHash instHash, int matchSize, HashStore store) throws CancelledException Description copied from interface:DisambiguateStrategy
Generate (possibly multiple) hashes that can be used to disambiguate an n-gram and its block from other blocks with similar instructions. Hashes are attached to the block's disambigHash list.- Specified by:
calcHashes
in interfaceDisambiguateStrategy
- Parameters:
instHash
- the instruction hashmatchSize
- the number of instructions to matchstore
- is the HashStore used to store the disambiguating hashes- Returns:
- the list of disambiguating hashes
- Throws:
CancelledException
-