Package ghidra.app.services

# Class AnalysisPriority

java.lang.Object
ghidra.app.services.AnalysisPriority

public class AnalysisPriority extends Object
Class to specify priority within the Automated Analysis pipeline.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final AnalysisPriority`
  `BLOCK_ANALYSIS`
  Defines block analysis as the second priority for automatic analysis.
  `static final AnalysisPriority`
  `CODE_ANALYSIS`
  Defines code analysis as the fourth priority for automatic analysis.
  `static final AnalysisPriority`
  `DATA_ANALYSIS`
  Defines data analysis as the seventh priority for automatic analysis.
  `static final AnalysisPriority`
  `DATA_TYPE_PROPOGATION`
  Defines data type propogation as the ninth priority for automatic analysis.
  `static final AnalysisPriority`
  `DISASSEMBLY`
  Defines disassembly as the third priority for automatic analysis.
  `static final AnalysisPriority`
  `FORMAT_ANALYSIS`
  Defines a full format analysis as the first priority for automatic analysis.
  `static final AnalysisPriority`
  `FUNCTION_ANALYSIS`
  Defines function analysis as the fifth priority for automatic analysis.
  `static final AnalysisPriority`
  `FUNCTION_ID_ANALYSIS`
  Defines Function identification analysis as the eighth priority for automatic analysis.
  `static final AnalysisPriority`
  `HIGHEST_PRIORITY`
  `static final AnalysisPriority`
  `LOW_PRIORITY`
  `static final AnalysisPriority`
  `REFERENCE_ANALYSIS`
  Defines reference analysis as the sixth priority for automatic analysis.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AnalysisPriority(int priority)`
  `AnalysisPriority(String name, int priority)`
  Construct a new priority object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AnalysisPriority`
  `after()`
  Get a piority that is a little lower than this one.
  `AnalysisPriority`
  `before()`
  Get a priority that is a little higher than this one.
  `static AnalysisPriority`
  `getInitial(String name)`
  Return first gross priority.
  `AnalysisPriority`
  `getNext(String nextName)`
  Get the next gross priority.
  `int`
  `priority()`
  Return the priority specified for this analysis priority.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### FORMAT_ANALYSIS

    public static final AnalysisPriority FORMAT_ANALYSIS
    Defines a full format analysis as the first priority for automatic analysis. These are the first analyzers that will run after import. Possibly there is a need to move blocks around, or create headers. Analyzers that will look binary as a full file format analysis should run with this priority. NOTE: there may be analyzers that run before this that need to fix issues like Non-Returning functions. Be very careful running an analyzer with a higher priority.

  - ### BLOCK_ANALYSIS

    public static final AnalysisPriority BLOCK_ANALYSIS
    Defines block analysis as the second priority for automatic analysis. Initial markup of raw bytes should occur at or after this priority (images, etc). The initial disassembly of EntryPoints will occur at this priority.

  - ### DISASSEMBLY

    public static final AnalysisPriority DISASSEMBLY
    Defines disassembly as the third priority for automatic analysis. Disassembly of code found through good solid flow will occur at this priority. More heuristic code recovery will occur later.

  - ### CODE_ANALYSIS

    public static final AnalysisPriority CODE_ANALYSIS
    Defines code analysis as the fourth priority for automatic analysis. If your analyzer is looking at RAW CODE, you should general go at or after this priority. Usually this is used in conjunction with analyzers that process new instructions `AnalyzerType.INSTRUCTIONS`. It is also useful for those analyzers that depend on code, but want to analyze flow, such as non-returning functions, that should happen before functions are widely laid down. If bad flow is not fixed at an early priority, switch stmt recovery, function boundaries, etc... may need to be redone and bad stuff cleaned up.

  - ### FUNCTION_ANALYSIS

    public static final AnalysisPriority FUNCTION_ANALYSIS
    Defines function analysis as the fifth priority for automatic analysis. After this priority, basic functions and their instructions should be recovered. More functions could be recovered in further analysis, but if your analysis depends on basic function creation, you should go after this priority.

  - ### REFERENCE_ANALYSIS

    public static final AnalysisPriority REFERENCE_ANALYSIS
    Defines reference analysis as the sixth priority for automatic analysis. After this priority, basic reference recovery should have taken place. More references could be recovered later.

  - ### DATA_ANALYSIS

    public static final AnalysisPriority DATA_ANALYSIS
    Defines data analysis as the seventh priority for automatic analysis. After this priority, data creation (strings, pointers) should have settled down. More data can be recovered with further analysis.

  - ### FUNCTION_ID_ANALYSIS

    public static final AnalysisPriority FUNCTION_ID_ANALYSIS
    Defines Function identification analysis as the eighth priority for automatic analysis. After this priority, full function (name/class) evaluation should have taken place.

  - ### DATA_TYPE_PROPOGATION

    public static final AnalysisPriority DATA_TYPE_PROPOGATION
    Defines data type propogation as the ninth priority for automatic analysis. Data type propogation analysis should hapen as late as possible so that all basic code recovery, reference analysis, etc... has taken place.

  - ### LOW_PRIORITY

    public static final AnalysisPriority LOW_PRIORITY

  - ### HIGHEST_PRIORITY

    public static final AnalysisPriority HIGHEST_PRIORITY

- ## Constructor Details

  - ### AnalysisPriority

    public AnalysisPriority(int priority)

  - ### AnalysisPriority

    public AnalysisPriority(String name, int priority)
    Construct a new priority object.
    Parameters:
      `priority` - priority to use

- ## Method Details

  - ### priority

    public int priority()
    Return the priority specified for this analysis priority.

  - ### before

    public AnalysisPriority before()
    Get a priority that is a little higher than this one.
    Returns:
      a higher priority

  - ### after

    public AnalysisPriority after()
    Get a piority that is a little lower than this one.
    Returns:
      a lower priority

  - ### getInitial

    public static AnalysisPriority getInitial(String name)
    Return first gross priority.
    Returns:
      first gross priority

  - ### getNext

    public AnalysisPriority getNext(String nextName)
    Get the next gross priority.
    Returns:
      return next gross priority

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`