Package ghidra.app.util.bin.format.pe.debug

# Class DebugMisc

java.lang.Object
ghidra.app.util.bin.format.pe.debug.DebugMisc

All Implemented Interfaces:
  `StructConverter`

public class DebugMisc extends Object implements StructConverter
A class to represent the `IMAGE_DEBUG_MISC` struct as defined in `winnt.h`.

     typedef struct _IMAGE_DEBUG_MISC {
         DWORD       DataType;               // type of misc data, see defines
         DWORD       Length;                 // total length of record, rounded to four
                                             // byte multiple.
         BOOLEAN     Unicode;                // TRUE if data is unicode string
         BYTE        Reserved[ 3 ];
         BYTE        Data[ 1 ];              // Actual data
     }

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `NAME`
  The name to use when converting into a structure data type.

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getActualData()`
  Returns a string equivalent of the actual misc debug data.
  `int`
  `getDataType()`
  Returns the data type of this misc debug.
  `DebugDirectory`
  `getDebugDirectory()`
  Returns the debug directory associated with this misc debug.
  `int`
  `getLength()`
  Returns the length of this misc debug.
  `byte[]`
  `getReserved()`
  Returns the array of reserved bytes.
  `boolean`
  `isUnicode()`
  Returns true if this misc debug is unicode.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.
  `String`
  `toString()`

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

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

- ## Field Details

  - ### NAME

    public static final String NAME
    The name to use when converting into a structure data type.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getDataType

    public int getDataType()
    Returns the data type of this misc debug.
    Returns:
      the data type of this misc debug

  - ### getLength

    public int getLength()
    Returns the length of this misc debug.
    Returns:
      the length of this misc debug

  - ### isUnicode

    public boolean isUnicode()
    Returns true if this misc debug is unicode.
    Returns:
      true if this misc debug is unicode

  - ### getReserved

    public byte[] getReserved()
    Returns the array of reserved bytes.
    Returns:
      the array of reserved bytes

  - ### getActualData

    public String getActualData()
    Returns a string equivalent of the actual misc debug data.
    Returns:
      a string equivalent of the actual misc debug data

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`
    See Also:
      - `Object.toString()`

  - ### getDebugDirectory

    public DebugDirectory getDebugDirectory()
    Returns the debug directory associated with this misc debug.
    Returns:
      the debug directory associated with this misc debug

  - ### toDataType

    public DataType toDataType() throws DuplicateNameException
    Description copied from interface: `StructConverter`
    Returns a structure datatype representing the contents of the implementor of this interface.

    For example, given:

         class A {
             int foo;
             double bar;
         }

    The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

    Specified by:
      `toDataType` in interface `StructConverter`
    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
    See Also:
      - `StructConverter.toDataType()`