Package ghidra.feature.vt.gui.util
Class ImpliedMatchUtils
java.lang.Object
ghidra.feature.vt.gui.util.ImpliedMatchUtils
Utility class for finding version tracking implied matches given an accepted matched function.
Each referenced data and function that exist in equivalent sections of the matched source
and destination functions will added to the current version tracking session as an implied match.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Set
<VTImpliedMatchInfo> findImpliedMatches
(ghidra.program.model.listing.Function sourceFunction, ghidra.program.model.listing.Function destinationFunction, VTSession session, AddressCorrelatorManager correlatorManager, ghidra.util.task.TaskMonitor monitor) Method for finding version tracking implied matches given an accepted matched function.static ghidra.program.model.listing.Function
getDestinationFunction
(VTSession session, VTAssociation association) Returns the destination function given a version tracking session and association pairstatic ghidra.program.model.listing.Function
getSourceFunction
(VTSession session, VTAssociation association) Returns the source function given a version tracking session and association pairstatic VTMatch
resolveImpliedMatch
(VTImpliedMatchInfo impliedMatch, VTSession session) Returns an existing match that best correlates to the implied match; returns null if no existing match can be found.static void
updateImpliedMatchForAcceptedAssocation
(ghidra.program.model.listing.Function sourceFunction, ghidra.program.model.listing.Function destinationFunction, VTSession session, AddressCorrelatorManager correlatorManager, ghidra.util.task.TaskMonitor monitor) Called when aVTAssociation
is accepted.static void
updateImpliedMatchForClearedAssocation
(ghidra.program.model.listing.Function sourceFunction, ghidra.program.model.listing.Function destinationFunction, VTSession session, AddressCorrelatorManager correlatorManager, ghidra.util.task.TaskMonitor monitor) Called when aVTAssociation
is cleared.
-
Constructor Details
-
ImpliedMatchUtils
public ImpliedMatchUtils()
-
-
Method Details
-
updateImpliedMatchForAcceptedAssocation
public static void updateImpliedMatchForAcceptedAssocation(ghidra.program.model.listing.Function sourceFunction, ghidra.program.model.listing.Function destinationFunction, VTSession session, AddressCorrelatorManager correlatorManager, ghidra.util.task.TaskMonitor monitor) throws ghidra.util.exception.CancelledException Called when aVTAssociation
is accepted. This method will create implied matches in the current session based on the association.- Parameters:
sourceFunction
- The matched function from the source programdestinationFunction
- The matched function from the destination programsession
- The Version Tracking sessioncorrelatorManager
- Keeps track of which section of the source function corresponds to the which section of the destination functionmonitor
- Handles user cancellations- Throws:
ghidra.util.exception.CancelledException
- if cancelled
-
updateImpliedMatchForClearedAssocation
public static void updateImpliedMatchForClearedAssocation(ghidra.program.model.listing.Function sourceFunction, ghidra.program.model.listing.Function destinationFunction, VTSession session, AddressCorrelatorManager correlatorManager, ghidra.util.task.TaskMonitor monitor) throws ghidra.util.exception.CancelledException Called when aVTAssociation
is cleared. This method will create implied matches in the current session based on the association.- Parameters:
sourceFunction
- The matched function from the source programdestinationFunction
- The matched function from the destination programsession
- The Version Tracking sessioncorrelatorManager
- Keeps track of which section of the source function corresponds to the which section of the destination functionmonitor
- Handles user cancellations- Throws:
ghidra.util.exception.CancelledException
- if cancelled
-
findImpliedMatches
public static Set<VTImpliedMatchInfo> findImpliedMatches(ghidra.program.model.listing.Function sourceFunction, ghidra.program.model.listing.Function destinationFunction, VTSession session, AddressCorrelatorManager correlatorManager, ghidra.util.task.TaskMonitor monitor) throws ghidra.util.exception.CancelledException Method for finding version tracking implied matches given an accepted matched function. Each referenced data and function that exist in equivalent sections of the matched source and destination functions will be returned in the given set.- Parameters:
sourceFunction
- The matched function from the source programdestinationFunction
- The matched function from the destination programsession
- The Version Tracking sessioncorrelatorManager
- Keeps track of which section of the source function corresponds to the which section of the destination functionmonitor
- Handles user cancellations- Returns:
- a set of VTImpliedMatchInfo objects
- Throws:
ghidra.util.exception.CancelledException
- if cancelled
-
resolveImpliedMatch
Returns an existing match that best correlates to the implied match; returns null if no existing match can be found.- Parameters:
impliedMatch
- The implied match for which to find a real matchsession
- The session to search for the match- Returns:
- an existing match that best correlates to the implied match; returns null if no existing match can be found.
-
getSourceFunction
public static ghidra.program.model.listing.Function getSourceFunction(VTSession session, VTAssociation association) Returns the source function given a version tracking session and association pair- Parameters:
session
- The Version Tracking sessionassociation
- The association pair for a match- Returns:
- the source function given a version tracking session and association pair
-
getDestinationFunction
public static ghidra.program.model.listing.Function getDestinationFunction(VTSession session, VTAssociation association) Returns the destination function given a version tracking session and association pair- Parameters:
session
- The Version Tracking sessionassociation
- The association pair for a match- Returns:
- the destination function given a version tracking session and association pair
-