Package ghidra.program.util
Interface AddressCorrelator
- All Known Subinterfaces:
DiscoverableAddressCorrelator
public interface AddressCorrelator
Interface for address correlation algorithms that can generate an address mapping from one
set of program addresses to another.
This interface supplies a priority
of DEFAULT_PRIORITY
.
discoverable
correlators can change this priority to be a
lower value to be run before the supplied system correlators. Generally, the more specific or
restrictive a correlator, the earlier (higher priority) it should be.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default priority.static final int
A high priority (low number value) for correlators that should used before other correlatorsstatic final int
A low priority (high number value) for correlators that should used after other correlatorsstatic final int
A value used to raise or lower priorities. -
Method Summary
Modifier and TypeMethodDescriptionReturns an address mapping from one piece of data to another.Returns an address mapping from one function to another.Returns the options with the default settings for this correlator.Returns the current Option settings for this correlator.default int
Returns a number based on an arbitrary number scheme that dictates the order that correlators should be used.void
setOptions
(ToolOptions options) Sets the options to use for this correlator.
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYThe default priority. This applies to client-suppliedDiscoverableAddressCorrelator
s- See Also:
-
EARLY_PRIORITY
static final int EARLY_PRIORITYA high priority (low number value) for correlators that should used before other correlators- See Also:
-
LATE_CHANCE_PRIORITY
static final int LATE_CHANCE_PRIORITYA low priority (high number value) for correlators that should used after other correlators- See Also:
-
PRIORITY_OFFSET
static final int PRIORITY_OFFSETA value used to raise or lower priorities.- See Also:
-
-
Method Details
-
correlate
Returns an address mapping from one function to another.- Parameters:
sourceFunction
- the source function.destinationFunction
- the destination function.- Returns:
- an AddressCorrelation that represents a mapping of the addresses from the source function to the destination function.
-
correlate
Returns an address mapping from one piece of data to another.- Parameters:
sourceData
- the source data.destinationData
- the destination data.- Returns:
- an AddressCorrelation that represents a mapping of the addresses from the source data to the destination data.
-
getOptions
ToolOptions getOptions()Returns the current Option settings for this correlator.- Returns:
- the current Option settings for this correlator.
-
setOptions
Sets the options to use for this correlator.- Parameters:
options
- the options to use for this correlator.
-
getDefaultOptions
Options getDefaultOptions()Returns the options with the default settings for this correlator.- Returns:
- the options with the default settings for this correlator.
-
getPriority
default int getPriority()Returns a number based on an arbitrary number scheme that dictates the order that correlators should be used. If a correlator returns a null value from one of thecorrelate()
methods, then the next highest priority correlator will be called, and so on until a non-null correlation is found or all correlators have been called.A lower number value is a higher priority. See
DEFAULT_PRIORITY
.- Returns:
- the priority
-