Package ghidra.app.services
Interface Analyzer
- All Superinterfaces:
ExtensionPoint
- All Known Implementing Classes:
AbstractAnalyzer
,AbstractBinaryFormatAnalyzer
,AggressiveInstructionFinderAnalyzer
,AnalyzerAdapter
,AppleSingleDoubleAnalyzer
,ArmAggressiveInstructionFinderAnalyzer
,CoffAnalyzer
,CoffArchiveAnalyzer
,CondenseFillerBytesAnalyzer
,ElfAnalyzer
,GccExceptionAnalyzer
,MachoAnalyzer
,PefAnalyzer
,PortableExecutableAnalyzer
Interface to perform automatic analysis.
NOTE: ALL ANALYZER CLASSES MUST END IN "Analyzer". If not, the ClassSearcher will not find
them.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
added
(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) Called when the requested information type has been added, for example, when a function is added.void
analysisEnded
(Program program) Called when an auto-analysis session ends.boolean
canAnalyze
(Program program) Can this analyzer work on this program.Get the type of analysis this analyzer performsboolean
getDefaultEnablement
(Program program) Returns true if this analyzer should be enabled by default.Get a longer description of what this analyzer does.getName()
Get the name of this analyzerdefault ghidra.app.plugin.core.analysis.AnalysisOptionsUpdater
Returns an optional options updater that allows clients to migrate old options to new options.Get the priority that this analyzer should run at.boolean
Returns true if this analyzer is a prototype.void
optionsChanged
(Options options, Program program) Analyzers should initialize their options from the values in the given Options, providing appropriate default values.void
registerOptions
(Options options, Program program) Analyzers should register their options with associated default value, help content and descriptionboolean
removed
(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) Called when the requested information type has been removed, for example, when a function is removed.boolean
Returns true if it makes sense for this analyzer to directly invoked on an address or addressSet.
-
Method Details
-
getName
String getName()Get the name of this analyzer- Returns:
- analyzer name
-
getAnalysisType
AnalyzerType getAnalysisType()Get the type of analysis this analyzer performs- Returns:
- analyze type
-
getDefaultEnablement
Returns true if this analyzer should be enabled by default. Generally useful analyzers should return true. Specialized analyzers should return false;- Parameters:
program
- the program- Returns:
- true if enabled by default
-
supportsOneTimeAnalysis
boolean supportsOneTimeAnalysis()Returns true if it makes sense for this analyzer to directly invoked on an address or addressSet. The AutoAnalyzer plug-in will automatically create an action for each analyzer that returns true.- Returns:
- true if supports one-time analysis
-
getDescription
String getDescription()Get a longer description of what this analyzer does.- Returns:
- analyzer description
-
getPriority
AnalysisPriority getPriority()Get the priority that this analyzer should run at.- Returns:
- analyzer priority
-
canAnalyze
Can this analyzer work on this program.- Parameters:
program
- program to be analyzed- Returns:
- true if this analyzer can analyze this program
-
added
boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException Called when the requested information type has been added, for example, when a function is added.- Parameters:
program
- program to analyzeset
- AddressSet of locations that have been addedmonitor
- monitor that indicates progress and indicates whether the user canceled the analysislog
- a message log to record analysis information- Returns:
- true if the analysis succeeded
- Throws:
CancelledException
- if the analysis is cancelled
-
removed
boolean removed(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException Called when the requested information type has been removed, for example, when a function is removed.- Parameters:
program
- program to analyzeset
- AddressSet of locations that have been addedmonitor
- monitor that indicates progress and indicates whether the user canceled the analysislog
- a message log to record analysis information- Returns:
- true if the analysis succeeded
- Throws:
CancelledException
- if the analysis is cancelled
-
registerOptions
Analyzers should register their options with associated default value, help content and description- Parameters:
options
- the program options/property list that contains the optionsprogram
- program to be analyzed
-
getOptionsUpdater
default ghidra.app.plugin.core.analysis.AnalysisOptionsUpdater getOptionsUpdater()Returns an optional options updater that allows clients to migrate old options to new options. This can be used to facilitate option name changes, as well as option value type changes.- Returns:
- the updater; null if no updater
-
optionsChanged
Analyzers should initialize their options from the values in the given Options, providing appropriate default values.- Parameters:
options
- the program options/property list that contains the optionsprogram
- program to be analyzed
-
analysisEnded
Called when an auto-analysis session ends. This notifies the analyzer so it can clean up any resources that only needed to be maintained during a single auto-analysis session.- Parameters:
program
- the program that was just completed being analyzed
-
isPrototype
boolean isPrototype()Returns true if this analyzer is a prototype.- Returns:
- true if this analyzer is a prototype
-