Class SleighLanguageDescription

java.lang.Object
ghidra.program.model.lang.BasicLanguageDescription
ghidra.app.plugin.processors.sleigh.SleighLanguageDescription
All Implemented Interfaces:
LanguageDescription

public class SleighLanguageDescription extends BasicLanguageDescription
Class for holding Language identifiers
  • Constructor Details

    • SleighLanguageDescription

      public SleighLanguageDescription(LanguageID id, String description, Processor processor, Endian endian, Endian instructionEndian, int size, String variant, int version, int minorVersion, boolean deprecated, Map<String,Integer> spaceTruncations, List<CompilerSpecDescription> compilerSpecDescriptions, Map<String, List<String>> externalNames)
      Construct a new language description
      Parameters:
      id - the name of the language
      description - language description text
      processor - processor name/family
      endian - data endianess
      instructionEndian - instruction endianess
      size - processor size
      variant - processor variant name
      version - the major version of the language.
      minorVersion - minor version of language
      deprecated - true if this language should only be used for existing programs.
      spaceTruncations - address space truncations (or null)
      compilerSpecDescriptions - one or more compiler spec descriptions
      externalNames - collection of external tools' names for the language
  • Method Details

    • getTruncatedSpaceNames

      public Set<String> getTruncatedSpaceNames()
      Returns:
      set of address space names which have been identified for truncation
    • getTruncatedSpaceSize

      public int getTruncatedSpaceSize(String spaceName) throws NoSuchElementException
      Get the truncated space size for the specified address space
      Parameters:
      spaceName - address space name
      Returns:
      truncated space size in bytes
      Throws:
      NoSuchElementException
    • setDefsFile

      public void setDefsFile(ResourceFile defsFile)
      Set the (optional) specification file associated with this language
      Parameters:
      defsFile - the specFile to associate with this description.
    • getDefsFile

      public ResourceFile getDefsFile()
      Get the specification file (if it exists)
      Returns:
      specification file
    • setSpecFile

      public void setSpecFile(ResourceFile specFile)
      Set the (optional) specification file associated with this language
      Parameters:
      specFile - the specFile (.pspec) to associate with this description.
    • getSpecFile

      public ResourceFile getSpecFile()
      Get the specification (.pspec) file (if it exists)
      Returns:
      specification file (.pspec)
    • getLanguageFile

      public SleighLanguageFile getLanguageFile()
      Returns the SleighLanguageFile which represents the .sla and .slaspec files.
      Returns:
      SleighLanguageFile which represents the .sla and .slaspec files
    • getManualIndexFile

      public ResourceFile getManualIndexFile()
    • setManualIndexFile

      public void setManualIndexFile(ResourceFile manualIndexFile)
    • isSameSleighLanguageFile

      public boolean isSameSleighLanguageFile(SleighLanguageDescription other)
      Tests if two Sleigh languages are based on the same .sla file.
      Parameters:
      other - SleighLanguageDescription
      Returns:
      true if the other SleighLanguageDescription uses the same .sla file