Package ghidra.taint.model
Class TaintSet
java.lang.Object
ghidra.taint.model.TaintSet
An immutable set of multiple taint marks
A variable in an emulator could be tainted by multiple marks, so we must use vectors of sets, not
vectors of marks. Please see TaintMark.equals(Object) regarding the equality of tagged
marks.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleangetMarks()Get the marks in this setinthashCode()booleanisEmpty()Check if this set is emptystatic TaintSetCreate a taint set of the given marksstatic TaintSetParse a set of taint marksConstruct the taint set formed by tagging each mark in this settoString()Convert the set to a stringConstruct the taint set from the union of marks of this and the given taint set
-
Field Details
-
EMPTY
The empty set, the default for all state variables
-
-
Method Details
-
parse
Parse a set of taint marksThe form is a semicolon-separated list of taint marks, e.g., "
myVar:tag1,tag2;anotherVar;yetAnother".- Parameters:
string- the string to parse- Returns:
- the resulting set
-
of
Create a taint set of the given marks- Parameters:
marks- the marks- Returns:
- the set
-
toString
Convert the set to a string -
equals
-
hashCode
public int hashCode() -
getMarks
Get the marks in this set- Returns:
- the marks
-
isEmpty
public boolean isEmpty()Check if this set is empty- Returns:
- the marks
-
union
Construct the taint set from the union of marks of this and the given taint set- Parameters:
that- another taint set- Returns:
- the union
-
tagged
Construct the taint set formed by tagging each mark in this set- Parameters:
string- the tag to add to each mark- Returns:
- the new set
-