Package ghidra.app.util.bin.format.dwarf
Class DataTypeGraphComparator
java.lang.Object
ghidra.app.util.bin.format.dwarf.DataTypeGraphComparator
Compares two
DataType
directed graphs, calling a
method
that can observe each
DataType pair that occupy equivalent positions in each graph.
The first/left DataType graph is assumed to be composed of DataTypeImpl
instances,
and the second/right DataType graph is assumed to be composed of DataType DB instances.
Only DataTypes in the left graph are followed and may lead to a possible match with the right graph.
This class is used to help transfer mappings that point to impl DataTypes to also point them at the resultant 'db' DataTypes that are created by the DataTypeManager.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
compare
(DataType preDT, DataType postDT, DataTypeGraphComparator.DataTypePairObserver observer) Compares twodatatypes
graphs, calling the observer callback for each paired DataType that occupy equivalent positions in each graph.
-
Method Details
-
compare
public static void compare(DataType preDT, DataType postDT, DataTypeGraphComparator.DataTypePairObserver observer) Compares twodatatypes
graphs, calling the observer callback for each paired DataType that occupy equivalent positions in each graph.- Parameters:
preDT
- - Original (impl) DataType from before submitting to DataTypeManager.postDT
- - Result DataType from the DataTypeManagerobserver
- - Callback called for each position in the preDT graph that has a matching position in the postDT graph.
-