Class DebugDirectory

java.lang.Object
ghidra.app.util.bin.format.pe.debug.DebugDirectory
All Implemented Interfaces:
ByteArrayConverter, StructConverter

public class DebugDirectory extends Object implements StructConverter, ByteArrayConverter
A class to represent the Debug Directory data structure.
 typedef struct _IMAGE_DEBUG_DIRECTORY {
     DWORD   Characteristics;
     DWORD   TimeDateStamp;
     WORD    MajorVersion;
     WORD    MinorVersion;
     DWORD   Type;
     DWORD   SizeOfData;
     DWORD   AddressOfRawData;
     DWORD   PointerToRawData;
 } IMAGE_DEBUG_DIRECTORY, *PIMAGE_DEBUG_DIRECTORY;
 

  • Field Details

    • NAME

      public static final String NAME
      The name to use when converting into a structure data type.
      See Also:
    • IMAGE_SIZEOF_DEBUG_DIRECTORY

      public static final int IMAGE_SIZEOF_DEBUG_DIRECTORY
      The size of the IMAGE_DEBUG_DIRECTORY, in bytes.
      See Also:
  • Method Details

    • getCharacteristics

      public int getCharacteristics()
      Reserved.
      Returns:
      reserved value
    • getTimeDateStamp

      public int getTimeDateStamp()
      Returns the time and date the debugging information was created.
      Returns:
      the time and date the debugging information was created
    • getMajorVersion

      public int getMajorVersion()
      Returns the major version number of the debugging information format.
      Returns:
      the major version number of the debugging information format
    • getMinorVersion

      public int getMinorVersion()
      Returns the minor version number of the debugging information format.
      Returns:
      the minor version number of the debugging information format
    • getType

      public int getType()
      Returns the format of the debugging information.
      Returns:
      the format of the debugging information
    • getSizeOfData

      public int getSizeOfData()
      Returns the size of the debugging information, in bytes. This value does not include the debug directory itself.
      Returns:
      the size of the debugging information, in bytes
    • getAddressOfRawData

      public int getAddressOfRawData()
      Returns the address of the debugging information when the image is loaded, relative to the image base.
      Returns:
      the address of the debugging information when the image is loaded, relative to the image base
    • getPointerToRawData

      public int getPointerToRawData()
      Returns the file pointer to the debugging information.
      Returns:
      the file pointer to the debugging information
    • getDescription

      public String getDescription()
      Returns a description of this debug directory.
      Returns:
      a description of this debug directory
    • setDescription

      public void setDescription(String desc)
      Sets the description of this debug directory.
      Parameters:
      desc - the description of this debug directory
    • 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:
    • writeHeader

      public void writeHeader(RandomAccessFile raf, DataConverter dc) throws IOException
      Throws:
      IOException
    • toBytes

      public byte[] toBytes(DataConverter dc)
      Description copied from interface: ByteArrayConverter
      Returns a byte array representing this implementor of this interface.
      Specified by:
      toBytes in interface ByteArrayConverter
      Parameters:
      dc - the data converter to use
      Returns:
      a byte array representing this object
    • updatePointers

      public void updatePointers(int offset, int postOffset)