Package ghidra.app.services
Class AbstractAnalyzer
java.lang.Object
ghidra.app.services.AbstractAnalyzer
- All Implemented Interfaces:
Analyzer
,ExtensionPoint
- Direct Known Subclasses:
AbstractBinaryFormatAnalyzer
,AggressiveInstructionFinderAnalyzer
,AnalyzerAdapter
,ArmAggressiveInstructionFinderAnalyzer
,CondenseFillerBytesAnalyzer
,GccExceptionAnalyzer
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractAnalyzer
(String name, String description, AnalyzerType type) -
Method Summary
Modifier and TypeMethodDescriptionvoid
analysisEnded
(Program program) Called when an auto-analysis session ends.boolean
canAnalyze
(Program program) Can this analyzer work on this program.final AnalyzerType
Get the type of analysis this analyzer performsboolean
getDefaultEnablement
(Program program) Returns true if this analyzer should be enabled by default.final String
Get a longer description of what this analyzer does.final String
getName()
Get the name of this analyzerfinal AnalysisPriority
Get the priority that this analyzer should run at.final 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.protected void
setDefaultEnablement
(boolean b) protected void
setPriority
(AnalysisPriority priority) protected void
protected void
protected void
setSupportsOneTimeAnalysis
(boolean supportsOneTimeAnalysis) final boolean
Returns true if it makes sense for this analyzer to directly invoked on an address or addressSet.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.app.services.Analyzer
added, getOptionsUpdater
-
Constructor Details
-
AbstractAnalyzer
-
-
Method Details
-
setPriority
-
setDefaultEnablement
protected void setDefaultEnablement(boolean b) -
setSupportsOneTimeAnalysis
protected void setSupportsOneTimeAnalysis() -
setSupportsOneTimeAnalysis
protected void setSupportsOneTimeAnalysis(boolean supportsOneTimeAnalysis) -
setPrototype
protected void setPrototype() -
getName
Description copied from interface:Analyzer
Get the name of this analyzer -
getAnalysisType
Description copied from interface:Analyzer
Get the type of analysis this analyzer performs- Specified by:
getAnalysisType
in interfaceAnalyzer
- Returns:
- analyze type
-
getDefaultEnablement
Description copied from interface:Analyzer
Returns true if this analyzer should be enabled by default. Generally useful analyzers should return true. Specialized analyzers should return false;- Specified by:
getDefaultEnablement
in interfaceAnalyzer
- Parameters:
program
- the program- Returns:
- true if enabled by default
-
supportsOneTimeAnalysis
public final boolean supportsOneTimeAnalysis()Description copied from interface:Analyzer
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.- Specified by:
supportsOneTimeAnalysis
in interfaceAnalyzer
- Returns:
- true if supports one-time analysis
-
getDescription
Description copied from interface:Analyzer
Get a longer description of what this analyzer does.- Specified by:
getDescription
in interfaceAnalyzer
- Returns:
- analyzer description
-
getPriority
Description copied from interface:Analyzer
Get the priority that this analyzer should run at.- Specified by:
getPriority
in interfaceAnalyzer
- Returns:
- analyzer priority
-
removed
public boolean removed(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException Description copied from interface:Analyzer
Called when the requested information type has been removed, for example, when a function is removed.- Specified by:
removed
in interfaceAnalyzer
- 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
-
canAnalyze
Description copied from interface:Analyzer
Can this analyzer work on this program.- Specified by:
canAnalyze
in interfaceAnalyzer
- Parameters:
program
- program to be analyzed- Returns:
- true if this analyzer can analyze this program
-
optionsChanged
Description copied from interface:Analyzer
Analyzers should initialize their options from the values in the given Options, providing appropriate default values.- Specified by:
optionsChanged
in interfaceAnalyzer
- Parameters:
options
- the program options/property list that contains the optionsprogram
- program to be analyzed
-
analysisEnded
Description copied from interface:Analyzer
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.- Specified by:
analysisEnded
in interfaceAnalyzer
- Parameters:
program
- the program that was just completed being analyzed
-
isPrototype
public final boolean isPrototype()Description copied from interface:Analyzer
Returns true if this analyzer is a prototype.- Specified by:
isPrototype
in interfaceAnalyzer
- Returns:
- true if this analyzer is a prototype
-
registerOptions
Description copied from interface:Analyzer
Analyzers should register their options with associated default value, help content and description- Specified by:
registerOptions
in interfaceAnalyzer
- Parameters:
options
- the program options/property list that contains the optionsprogram
- program to be analyzed
-