Class DWARFMacroEnumCreator

java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFMacroEnumCreator

public class DWARFMacroEnumCreator extends Object
Creates Enum data types in the program from DWARF macro info entries. Each macro that can be resolved to a long value results in an Enum datatype with a single value
  • Field Details

  • Constructor Details

    • DWARFMacroEnumCreator

      public DWARFMacroEnumCreator(DWARFProgram dprog)
      Constructor
      Parameters:
      dprog - DWARF Program
  • Method Details

    • createEnumsFromMacroInfo

      public void createEnumsFromMacroInfo(boolean includeCommandLineDefines, TaskMonitor monitor) throws CancelledException, IOException
      Creates Ghidra Enums from DWARF macro info entries.

      The enums are placed in the program_name/DWARF/_DEFINES_ category path. Only one Enum is created for a given name. Creating multiple Enums for redefined or multiply-defined macros in not current supported. Each value in an enum given a comment consisting of the name of the corresponding compilation unit.

      Parameters:
      includeCommandLineDefines - if false, macros passed on the command line are ignored
      monitor - monitor
      Throws:
      CancelledException - if user cancels
      IOException - if error reading macro info