Class DebugDirectory

  • All Implemented Interfaces:
    ByteArrayConverter, StructConverter

    public class DebugDirectory
    extends java.lang.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;
     

    • Constructor Summary

      Constructors 
      Constructor Description
      DebugDirectory()
      DO NOT USE THIS CONSTRUCTOR, USE create*(GenericFactory ...) FACTORY METHODS INSTEAD.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getAddressOfRawData()
      Returns the address of the debugging information when the image is loaded, relative to the image base.
      int getCharacteristics()
      Reserved.
      java.lang.String getDescription()
      Returns a description of this debug directory.
      int getMajorVersion()
      Returns the major version number of the debugging information format.
      int getMinorVersion()
      Returns the minor version number of the debugging information format.
      int getPointerToRawData()
      Returns the file pointer to the debugging information.
      int getSizeOfData()
      Returns the size of the debugging information, in bytes.
      int getTimeDateStamp()
      Returns the time and date the debugging information was created.
      int getType()
      Returns the format of the debugging information.
      void setDescription​(java.lang.String desc)
      Sets the description of this debug directory.
      byte[] toBytes​(DataConverter dc)
      Returns a byte array representing this implementor of this interface.
      DataType toDataType()
      Returns a structure datatype representing the contents of the implementor of this interface.
      void updatePointers​(int offset, int postOffset)  
      void writeHeader​(java.io.RandomAccessFile raf, DataConverter dc)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NAME

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

        public static final int IMAGE_SIZEOF_DEBUG_DIRECTORY
        The size of the IMAGE_DEBUG_DIRECTORY, in bytes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • DebugDirectory

        public DebugDirectory()
        DO NOT USE THIS CONSTRUCTOR, USE create*(GenericFactory ...) FACTORY METHODS INSTEAD.
    • Method Detail

      • 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 java.lang.String getDescription()
        Returns a description of this debug directory.
        Returns:
        a description of this debug directory
      • setDescription

        public void setDescription​(java.lang.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:
        StructConverter.toDataType()
      • writeHeader

        public void writeHeader​(java.io.RandomAccessFile raf,
                                DataConverter dc)
                         throws java.io.IOException
        Throws:
        java.io.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)