Class StructureRecoveryPlugin

java.lang.Object
ghidra.framework.plugintool.Plugin
ghidra.app.plugin.ProgramPlugin
ghidra.features.bsim.gui.structs.StructureRecoveryPlugin
All Implemented Interfaces:
OptionsChangeListener, PluginEventListener, ServiceListener, ExtensionPoint

public class StructureRecoveryPlugin extends ProgramPlugin implements OptionsChangeListener
Plugin for recovering structure layouts across programs.
  • Field Details

  • Constructor Details

    • StructureRecoveryPlugin

      public StructureRecoveryPlugin(PluginTool tool)
  • Method Details

    • getCurrentFunction

      public Function getCurrentFunction()
    • programActivated

      protected void programActivated(Program program)
      Description copied from class: ProgramPlugin
      Subclass should override this method if it is interested when programs become active. Note: this method is called in response to a ProgramActivatedPluginEvent.

      At the time this method is called, the "currentProgram" variable will be set the new active program.

      Overrides:
      programActivated in class ProgramPlugin
      Parameters:
      program - the new program going active.
    • programClosed

      protected void programClosed(Program program)
      Description copied from class: ProgramPlugin
      Subclasses should override this method if it is interested when a program is closed. This event has no affect on the "current Program". A "programDeactivated" call will occur that affects the active program.
      Overrides:
      programClosed in class ProgramPlugin
      Parameters:
      program - the program being closed.
    • optionsChanged

      public void optionsChanged(ToolOptions options, String optionName, Object oldValue, Object newValue) throws OptionsVetoException
      Description copied from interface: OptionsChangeListener
      Notification that an option changed.

      Note: to reject an options change, you can throw a OptionsVetoException.

      Specified by:
      optionsChanged in interface OptionsChangeListener
      Parameters:
      options - options object containing the property that changed
      optionName - name of option that changed
      oldValue - old value of the option
      newValue - new value of the option
      Throws:
      OptionsVetoException - if a change is rejected
    • getCurrentProgram

      public Program getCurrentProgram()
      Overrides:
      getCurrentProgram in class ProgramPlugin
    • close

      public void close()
      Description copied from class: Plugin
      Close the plugin. This is when the plugin should release resources, such as those from other services. This method should not close resources being used by others (that should happen in dispose()).

      This method will be called before Plugin.dispose().

      Overrides:
      close in class Plugin
    • processEvent

      public void processEvent(PluginEvent event)
      Description copied from class: ProgramPlugin
      Process the plugin event.

      When a program closed event or focus changed event comes in, the locationChanged() and selectionChanged() methods are called with null arguments; currentProgram and currentLocation are cleared.

      Note: if the subclass overrides processEvent(), it should call super.processEvent().

      Overrides:
      processEvent in class ProgramPlugin
      Parameters:
      event - plugin to process
    • loadTargetProgram

    • getOffsets

      public Map<String,Long> getOffsets()
    • getFieldNames

      public Map<Long,String> getFieldNames()
    • getFunctionMap

      public Map<Function, Set<Function>> getFunctionMap()
    • setFunctionMap

      public void setFunctionMap(Map<Function, Set<Function>> map)
    • getFunctionsByField

      public Map<String, Set<Function>> getFunctionsByField()
    • setFunctionsByField

      public void setFunctionsByField(Map<String, Set<Function>> functionsByField)
    • getAddressesByField

      public Map<String, AddressSet> getAddressesByField()
    • setAddressesByField

      public void setAddressesByField(Map<String, AddressSet> toAddressSet)
    • getFunctionsToMatch

      public Set<Function> getFunctionsToMatch()
    • setFunctionsToMatch

      public void setFunctionsToMatch(Set<Function> srcFunctionsToMatch)
    • getTargetDataType

      public Structure getTargetDataType()
    • getConsole

      public ConsoleService getConsole()
    • getTargetProgram

      public Program getTargetProgram()
    • getDefaultStructureName

      public String getDefaultStructureName()
    • getOptionStructUseBookmarks

      public boolean getOptionStructUseBookmarks()
    • getOptionFnMatchBookmarks

      public boolean getOptionFnMatchBookmarks()
    • getSelfSiginificanceBound

      public double getSelfSiginificanceBound()
    • getMatchSimilarityLowerBound

      public double getMatchSimilarityLowerBound()
    • getMatchSimilarityUpperBound

      public double getMatchSimilarityUpperBound()
    • getMatchConfidenceLowerBound

      public double getMatchConfidenceLowerBound()
    • getMinConfidence

      public double getMinConfidence()
    • getMaxOffset

      public long getMaxOffset()
    • getExcludedOffsets

      public Set<Long> getExcludedOffsets()
    • getOptionSoloMatchesOnly

      public StructureRecoveryPlugin.FunctionMatchOption getOptionSoloMatchesOnly()