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

# Enum Class DWARFForm

java.lang.Object
java.lang.Enum<DWARFForm>
ghidra.app.util.bin.format.dwarf.attribs.DWARFForm

All Implemented Interfaces:
  `Serializable`, `Comparable<DWARFForm>`, `Constable`

public enum DWARFForm extends Enum<DWARFForm>
DWARF attribute encodings.

Unknown encodings will prevent deserialization of DIE records.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `DW_FORM_addr`
  `DW_FORM_addrx`
  `DW_FORM_addrx1`
  `DW_FORM_addrx2`
  `DW_FORM_addrx3`
  `DW_FORM_addrx4`
  `DW_FORM_block`
  `DW_FORM_block1`
  `DW_FORM_block2`
  `DW_FORM_block4`
  `DW_FORM_data1`
  `DW_FORM_data16`
  `DW_FORM_data2`
  `DW_FORM_data4`
  `DW_FORM_data8`
  `DW_FORM_exprloc`
  `DW_FORM_flag`
  `DW_FORM_flag_present`
  `DW_FORM_implicit_const`
  `DW_FORM_indirect`
  `DW_FORM_line_strp`
  `DW_FORM_loclistx`
  `DW_FORM_ref_addr`
  `DW_FORM_ref_sig8`
  `DW_FORM_ref_sup4`
  `DW_FORM_ref_sup8`
  `DW_FORM_ref_udata`
  `DW_FORM_ref1`
  `DW_FORM_ref2`
  `DW_FORM_ref4`
  `DW_FORM_ref8`
  `DW_FORM_rnglistx`
  `DW_FORM_sdata`
  `DW_FORM_sec_offset`
  `DW_FORM_string`
  `DW_FORM_strp`
  `DW_FORM_strp_sup`
  `DW_FORM_strx`
  `DW_FORM_strx1`
  `DW_FORM_strx2`
  `DW_FORM_strx3`
  `DW_FORM_strx4`
  `DW_FORM_udata`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `EOL`
  `static final int`
  `MAX_BLOCK4_SIZE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Set<DWARFAttributeClass>`
  `getFormClasses()`
  `int`
  `getId()`
  Returns the id of this DWARFForm.
  `long`
  `getSize(DWARFFormContext context)`
  Returns the size the attribute value occupies in the stream.
  `boolean`
  `isClass(DWARFAttributeClass attrClass)`
  `static DWARFForm`
  `of(int key)`
  Find the form value given raw int.
  `DWARFAttributeValue`
  `readValue(DWARFFormContext context)`
  Reads a DIE attribute value from a stream.
  `static DWARFForm`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static DWARFForm[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

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

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### DW_FORM_addr

    public static final DWARFForm DW_FORM_addr

  - ### DW_FORM_block2

    public static final DWARFForm DW_FORM_block2

  - ### DW_FORM_block4

    public static final DWARFForm DW_FORM_block4

  - ### DW_FORM_data2

    public static final DWARFForm DW_FORM_data2

  - ### DW_FORM_data4

    public static final DWARFForm DW_FORM_data4

  - ### DW_FORM_data8

    public static final DWARFForm DW_FORM_data8

  - ### DW_FORM_string

    public static final DWARFForm DW_FORM_string

  - ### DW_FORM_block

    public static final DWARFForm DW_FORM_block

  - ### DW_FORM_block1

    public static final DWARFForm DW_FORM_block1

  - ### DW_FORM_data1

    public static final DWARFForm DW_FORM_data1

  - ### DW_FORM_flag

    public static final DWARFForm DW_FORM_flag

  - ### DW_FORM_sdata

    public static final DWARFForm DW_FORM_sdata

  - ### DW_FORM_strp

    public static final DWARFForm DW_FORM_strp

  - ### DW_FORM_udata

    public static final DWARFForm DW_FORM_udata

  - ### DW_FORM_ref_addr

    public static final DWARFForm DW_FORM_ref_addr

  - ### DW_FORM_ref1

    public static final DWARFForm DW_FORM_ref1

  - ### DW_FORM_ref2

    public static final DWARFForm DW_FORM_ref2

  - ### DW_FORM_ref4

    public static final DWARFForm DW_FORM_ref4

  - ### DW_FORM_ref8

    public static final DWARFForm DW_FORM_ref8

  - ### DW_FORM_ref_udata

    public static final DWARFForm DW_FORM_ref_udata

  - ### DW_FORM_indirect

    public static final DWARFForm DW_FORM_indirect

  - ### DW_FORM_sec_offset

    public static final DWARFForm DW_FORM_sec_offset

  - ### DW_FORM_exprloc

    public static final DWARFForm DW_FORM_exprloc

  - ### DW_FORM_flag_present

    public static final DWARFForm DW_FORM_flag_present

  - ### DW_FORM_strx

    public static final DWARFForm DW_FORM_strx

  - ### DW_FORM_addrx

    public static final DWARFForm DW_FORM_addrx

  - ### DW_FORM_ref_sup4

    public static final DWARFForm DW_FORM_ref_sup4

  - ### DW_FORM_strp_sup

    public static final DWARFForm DW_FORM_strp_sup

  - ### DW_FORM_data16

    public static final DWARFForm DW_FORM_data16

  - ### DW_FORM_line_strp

    public static final DWARFForm DW_FORM_line_strp

  - ### DW_FORM_ref_sig8

    public static final DWARFForm DW_FORM_ref_sig8

  - ### DW_FORM_implicit_const

    public static final DWARFForm DW_FORM_implicit_const

  - ### DW_FORM_loclistx

    public static final DWARFForm DW_FORM_loclistx

  - ### DW_FORM_rnglistx

    public static final DWARFForm DW_FORM_rnglistx

  - ### DW_FORM_ref_sup8

    public static final DWARFForm DW_FORM_ref_sup8

  - ### DW_FORM_strx1

    public static final DWARFForm DW_FORM_strx1

  - ### DW_FORM_strx2

    public static final DWARFForm DW_FORM_strx2

  - ### DW_FORM_strx3

    public static final DWARFForm DW_FORM_strx3

  - ### DW_FORM_strx4

    public static final DWARFForm DW_FORM_strx4

  - ### DW_FORM_addrx1

    public static final DWARFForm DW_FORM_addrx1

  - ### DW_FORM_addrx2

    public static final DWARFForm DW_FORM_addrx2

  - ### DW_FORM_addrx3

    public static final DWARFForm DW_FORM_addrx3

  - ### DW_FORM_addrx4

    public static final DWARFForm DW_FORM_addrx4

- ## Field Details

  - ### EOL

    public static final int EOL
    See Also:
      - Constant Field Values

  - ### MAX_BLOCK4_SIZE

    public static final int MAX_BLOCK4_SIZE
    See Also:
      - Constant Field Values

- ## Method Details

  - ### values

    public static DWARFForm[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static DWARFForm valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null

  - ### getId

    public int getId()
    Returns the id of this DWARFForm.
    Returns:
      DWARFForm numeric id

  - ### getFormClasses

    public Set<DWARFAttributeClass> getFormClasses()

  - ### isClass

    public boolean isClass(DWARFAttributeClass attrClass)

  - ### getSize

    public long getSize(DWARFFormContext context) throws IOException
    Returns the size the attribute value occupies in the stream.

    This default implementation handles static sizes, as well as LEB128 and DWARF_INT sizes. DWARFForms that are more complex and marked as `DYNAMIC_SIZE` will need to override this method and provide custom logic to determine the size of a value.

    Parameters:
      `context` - `DWARFFormContext`
    Returns:
      size of the attribute value
    Throws:
      `IOException` - if error reading

  - ### readValue

    public DWARFAttributeValue readValue(DWARFFormContext context) throws IOException
    Reads a DIE attribute value from a stream.
    Parameters:
      `context` - `DWARFFormContext`
    Returns:
      `DWARFAttributeValue`
    Throws:
      `IOException` - if error reading

  - ### of

    public static DWARFForm of(int key)
    Find the form value given raw int.
    Parameters:
      `key` - value to check
    Returns:
      DWARFForm enum, or null if it is an unknown form