Package ghidra.util.bytesearch
Class Match
java.lang.Object
ghidra.util.bytesearch.Match
Represents a match of a DittedBitSequence at a given offset in a byte sequence.
 
 There is a hidden assumption that the sequence is actually a Pattern
 that might have a ditted-bit-sequence, a set of match actions,
 and post match rules/checks
- 
Constructor Summary
ConstructorsConstructorDescriptionMatch(DittedBitSequence sequence, long offset) Construct a Match of a DittedBitSequence at an offset within a byte stream. - 
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPostRules(long streamoffset) Check that the possible post rules are satisfiedlonglongintIf the sequence corresponds to a PatternPair, return the number of postbitsintint 
- 
Constructor Details
- 
Match
Construct a Match of a DittedBitSequence at an offset within a byte stream. Object normally used when a match occurs during a MemoryBytePatternSearch.- Parameters:
 sequence- that matchedoffset- from the start of byte stream where the matched occured
 
 - 
 - 
Method Details
- 
getNumPostBits
public int getNumPostBits()If the sequence corresponds to a PatternPair, return the number of postbits- Returns:
 - the number of post bits
 
 - 
getMatchActions
- Returns:
 - actions associated with this match
 
 - 
getSequenceSize
public int getSequenceSize()- Returns:
 - size in bytes of sequence
 
 - 
getSequenceIndex
public int getSequenceIndex()- Returns:
 - index of sequence in a possibly longer set of sequences
 
 - 
getMarkOffset
public long getMarkOffset()- Returns:
 - the offset of the match within a longer byte sequence
 
 - 
getMatchStart
public long getMatchStart()- Returns:
 - offset of match in sequence of bytes
 
 - 
checkPostRules
public boolean checkPostRules(long streamoffset) Check that the possible post rules are satisfied- Parameters:
 streamoffset- offset within from match location to check postrules.- Returns:
 - true if post rules are satisfied
 
 - 
getHexString
- Returns:
 - ditted bit sequence as a string
 
 - 
getSequence
- Returns:
 - the sequence that was matched
 
 
 -