Package ghidra.app.util.bin.format.dwarf4

# Class DWARFAbbreviation

java.lang.Object
ghidra.app.util.bin.format.dwarf4.DWARFAbbreviation

public class DWARFAbbreviation extends Object
This class represents the 'schema' for a DWARF DIE record.

A raw DWARF DIE record specifies its abbreviation code (pointing to an instance of this class) and the corresponding DWARFAbbreviation instance has the information about how the raw DIE is laid out.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DWARFAbbreviation(int abbreviationCode, int tag, boolean hasChildren, DWARFAttributeSpecification[] attributes)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `DWARFAttributeSpecification`
  `findAttribute(int attribute)`
  Get the attribute with the given attribute key.
  `int`
  `getAbbreviationCode()`
  Get the abbreviation code.
  `DWARFAttributeSpecification`
  `getAttributeAt(int index)`
  Get the attribute at the given index.
  `int`
  `getAttributeCount()`
  `DWARFAttributeSpecification[]`
  `getAttributes()`
  Return a live list of the attributes.
  `int`
  `getTag()`
  Get the tag value.
  `boolean`
  `hasChildren()`
  Checks to see if this abbreviation has any DIE children.
  `static DWARFAbbreviation`
  `read(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor)`
  `static Map<Integer,DWARFAbbreviation>`
  `readAbbreviations(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor)`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### DWARFAbbreviation

    public DWARFAbbreviation(int abbreviationCode, int tag, boolean hasChildren, DWARFAttributeSpecification[] attributes)

- ## Method Details

  - ### read

    public static DWARFAbbreviation read(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) throws IOException, CancelledException
    Throws:
      `IOException`
      `CancelledException`

  - ### readAbbreviations

    public static Map<Integer,DWARFAbbreviation> readAbbreviations(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) throws IOException, CancelledException
    Throws:
      `IOException`
      `CancelledException`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### getAbbreviationCode

    public int getAbbreviationCode()
    Get the abbreviation code.
    Returns:
      the abbreviation code

  - ### getTag

    public int getTag()
    Get the tag value.
    Returns:
      the tag value

  - ### hasChildren

    public boolean hasChildren()
    Checks to see if this abbreviation has any DIE children.
    Returns:
      true if this abbreviation has DIE children

  - ### getAttributes

    public DWARFAttributeSpecification[] getAttributes()
    Return a live list of the attributes.
    Returns:
      list of attributes

  - ### getAttributeCount

    public int getAttributeCount()

  - ### getAttributeAt

    public DWARFAttributeSpecification getAttributeAt(int index)
    Get the attribute at the given index.
    Parameters:
      `index` - index of the attribute
    Returns:
      attribute specification

  - ### findAttribute

    public DWARFAttributeSpecification findAttribute(int attribute)
    Get the attribute with the given attribute key.
    Parameters:
      `attribute` - attribute key
    Returns:
      attribute specification