Package ghidra.app.util.bin.format.dwarf

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ENUM_PATH`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DWARFMacroEnumCreator(DWARFProgram dprog)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `createEnumsFromMacroInfo(boolean includeCommandLineDefines, TaskMonitor monitor)`
  Creates Ghidra Enums from DWARF macro info entries.

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

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

- ## Field Details

  - ### ENUM_PATH

    public static final String ENUM_PATH
    See Also:
      - Constant Field Values

- ## 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