Interface Analyzer

All Superinterfaces:
ExtensionPoint
All Known Implementing Classes:
AbstractAnalyzer, AbstractBinaryFormatAnalyzer, AggressiveInstructionFinderAnalyzer, AnalyzerAdapter, AppleSingleDoubleAnalyzer, ArmAggressiveInstructionFinderAnalyzer, CoffAnalyzer, CoffArchiveAnalyzer, CondenseFillerBytesAnalyzer, ElfAnalyzer, GccExceptionAnalyzer, MachoAnalyzer, PefAnalyzer, PortableExecutableAnalyzer

public interface Analyzer extends ExtensionPoint
Interface to perform automatic analysis. NOTE: ALL ANALYZER CLASSES MUST END IN "Analyzer". If not, the ClassSearcher will not find them.
  • 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

      boolean getDefaultEnablement(Program program)
      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

      boolean canAnalyze(Program program)
      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 analyze
      set - AddressSet of locations that have been added
      monitor - monitor that indicates progress and indicates whether the user canceled the analysis
      log - 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 analyze
      set - AddressSet of locations that have been added
      monitor - monitor that indicates progress and indicates whether the user canceled the analysis
      log - a message log to record analysis information
      Returns:
      true if the analysis succeeded
      Throws:
      CancelledException - if the analysis is cancelled
    • registerOptions

      void registerOptions(Options options, Program program)
      Analyzers should register their options with associated default value, help content and description
      Parameters:
      options - the program options/property list that contains the options
      program - 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

      void optionsChanged(Options options, Program program)
      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 options
      program - program to be analyzed
    • analysisEnded

      void analysisEnded(Program program)
      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