Class ProgramInfo


  • public class ProgramInfo
    extends java.lang.Object
    This class stores values pulled from the PROGRAM, INFO_SOURCE, and LANGUAGE tag inside a ghidra program XML file. Please see PROGRAM.DTD
    • Field Summary

      Fields 
      Modifier and Type Field Description
      java.lang.String addressModel
      The size of the addressing (eg, "32 bit").
      CompilerSpecID compilerSpecID
      The program's compilerSpec id, e.g.
      java.lang.String endian
      The endianess (eg, big or little).
      java.lang.String exeFormat
      The format of the original executable (eg, PE or ELF).
      java.lang.String exePath
      The absolute path of where the original executable was imported.
      java.lang.String family
      The family name of the program's processor (eg, "Intel").
      java.lang.String imageBase
      The image base of the program.
      LanguageID languageID
      The program's language id, e.g.
      java.lang.String processorName
      The program's processor (eg, Processor.PROCESSOR_X86).
      java.lang.String programName
      The preferred name of the Program when loaded back into Ghidra.
      java.lang.String timestamp
      The timestamp of when the XML file was created.
      java.lang.String user
      The ID of the user that created the XML file.
      java.lang.String version
      The XML version.
    • Constructor Summary

      Constructors 
      Constructor Description
      ProgramInfo()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getNormalizedExternalToolName()
      Returns normalizedExternalToolName field.
      java.lang.String getTool()
      Returns tool field.
      void setCompilerSpecID​(java.lang.String compiler)  
      void setTool​(java.lang.String tool)
      Sets tool field.
      boolean shouldProcessStack()
      whether the XmlMgr should process stack frames and references.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • family

        public java.lang.String family
        The family name of the program's processor (eg, "Intel").
      • processorName

        public java.lang.String processorName
        The program's processor (eg, Processor.PROCESSOR_X86).
      • languageID

        public LanguageID languageID
        The program's language id, e.g. "x86:LE:32:default".
      • compilerSpecID

        public CompilerSpecID compilerSpecID
        The program's compilerSpec id, e.g. "gcc".
      • programName

        public java.lang.String programName
        The preferred name of the Program when loaded back into Ghidra.
      • timestamp

        public java.lang.String timestamp
        The timestamp of when the XML file was created.
      • user

        public java.lang.String user
        The ID of the user that created the XML file.
      • version

        public java.lang.String version
        The XML version. @deprecated since version 2.1.
      • addressModel

        public java.lang.String addressModel
        The size of the addressing (eg, "32 bit"). @deprecated since version 2.1.
      • endian

        public java.lang.String endian
        The endianess (eg, big or little).
      • exePath

        public java.lang.String exePath
        The absolute path of where the original executable was imported.
      • exeFormat

        public java.lang.String exeFormat
        The format of the original executable (eg, PE or ELF).
      • imageBase

        public java.lang.String imageBase
        The image base of the program.
    • Constructor Detail

      • ProgramInfo

        public ProgramInfo()
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • shouldProcessStack

        public boolean shouldProcessStack()
        whether the XmlMgr should process stack frames and references.
      • setCompilerSpecID

        public void setCompilerSpecID​(java.lang.String compiler)
      • getTool

        public java.lang.String getTool()
        Returns tool field. This is the name of the tool exactly as written in the XML being imported.
        Returns:
        tool field
      • setTool

        public void setTool​(java.lang.String tool)
        Sets tool field. Also sets normalizedExternalToolName to normalized tool names "IDA-PRO" or "GHIDRA" if appropriate, or just sets it to the value of tool.
      • getNormalizedExternalToolName

        public java.lang.String getNormalizedExternalToolName()
        Returns normalizedExternalToolName field. This is the name of the tool normalized into known categories ("IDA-PRO" or "GHIDRA") if appropriate.
        Returns:
        normalizedExternalToolName