Class DecompileDebugFormatManager

java.lang.Object
ghidra.app.util.opinion.DecompileDebugFormatManager

public class DecompileDebugFormatManager extends Object
Main manager for handling the coordination of the parsing of the XML and loading of the program details into Ghidra.
  • Constructor Details

    • DecompileDebugFormatManager

      public DecompileDebugFormatManager(File file)
      Constructs a new program Decompiler Debug XML manager using the provided file. The file should be an XML file generated by the Ghidra Decompiler as a debug file.
      Parameters:
      file - generated XML Decompile Debug file
    • DecompileDebugFormatManager

      public DecompileDebugFormatManager(ByteProvider provider)
      Constructs a new program Decompiler Debug XML manager using the provided ByteProvider.

      If ByteProvider has a FSRL and it is a simple local filepath, convert that to a normal local java.io.File instance instead of using the ByteProvider's File property which is probably located in the FileSystemService filecache directory, which will break the ability to find the *.bytes file associated with this .xml file.

      Parameters:
      provider - The provider
  • Method Details

    • getProgramInfo

      public ghidra.app.util.opinion.DecompileDebugXmlLoader.DecompileDebugProgramInfo getProgramInfo() throws SAXException, IOException
      Initial parsing of the XML file to obtain the binary image info with load specs.
      Returns:
      DecompileDebugProgramInfo binary image / load spec details
      Throws:
      SAXException - If there was a problem parsing the XML
      IOException - If there was an IO-related error
    • read

      public MessageLog read(Program prog, TaskMonitor monitor, String programName) throws LoadException
      Perform the parsing from the underlying decompile debug XML file and populates the program fields. See @DecompileDebug.java for reference on the generation of the XML file. Tags currently supported/expected:
      • <binaryimage>
      • <coretypes>
      • <typegrp>
      • <save_state>
      • <db>
      • <commentdb>
      • <stringmanage>
      NOTE: the following subtree tags are not yet supported:
      • <context_points>
      • <optionslist>
      Parameters:
      prog - created program
      monitor - task monitor
      programName - name of program
      Returns:
      MessageLog
      Throws:
      LoadException - If there is a parsing issue with the XML file.