Class DataDirectory

    • Field Detail

      • TITLE

        protected static final java.lang.String TITLE
        The name to use when converting into a structure data type.
        See Also:
        Constant Field Values

        public static final byte IMAGE_SIZEOF_IMAGE_DIRECTORY_ENTRY
        The size of the data directory, in bytes.
        See Also:
        Constant Field Values
      • virtualAddress

        protected int virtualAddress
      • size

        protected int size
      • hasParsed

        protected boolean hasParsed
    • Constructor Detail

      • DataDirectory

        public DataDirectory()
    • Method Detail

      • getDirectoryName

        public abstract java.lang.String getDirectoryName()
      • parse

        public abstract boolean parse()
        Parses this data directory.
        True if parsing completed successfully; otherwise, false.
        Throws: - If there was an IO problem while parsing.
      • va

        protected long va​(long va,
                          boolean isBinary)
      • createTerminatedString

        protected void createTerminatedString​(Program program,
                                              Address addr,
                                              boolean label,
                                              MessageLog log)
      • createDirectoryBookmark

        protected void createDirectoryBookmark​(Program program,
                                               Address addr)
      • setBookmark

        protected void setBookmark​(Program prog,
                                   Address addr,
                                   java.lang.String comment)
      • setPlateComment

        protected void setPlateComment​(Program prog,
                                       Address addr,
                                       java.lang.String comment)
      • setEolComment

        protected void setEolComment​(Program prog,
                                     Address addr,
                                     java.lang.String comment)
      • setPreComment

        protected void setPreComment​(Program prog,
                                     Address addr,
                                     java.lang.String comment)
      • createFragment

        protected boolean createFragment​(Program program,
                                         java.lang.String fragmentName,
                                         Address start,
                                         Address end)
        Creates a fragment with the given name (if it does not already exist). Move the address range into the fragment. Note: the end address is not inclusive!
      • getVirtualAddress

        public int getVirtualAddress()
        Returns the relative virtual address of this data directory.
        the relative virtual address of this data directory
      • setVirtualAddress

        public void setVirtualAddress​(int addr)
        Sets the relative virtual address of this data directory.
        addr - the new relative virtual address
      • getSize

        public int getSize()
        Returns the size of this data directory.
        the size of this data directory
      • setSize

        public void setSize​(int size)
        Sets the size of this data directory.
        size - the new size of this data directory
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object
        See Also:
      • writeBytes

        public void writeBytes​( raf,
                               DataConverter dc,
                               PortableExecutable template)
        Directories that are not contained inside of sections should override this method to write their bytes into the specified file.
        raf - the random access file used for output
        dc - the data converter for endianness
        template - the original unadulterated PE
        Throws: - if an I/O error occurs
      • hasParsedCorrectly

        public boolean hasParsedCorrectly()
      • getPointer

        public int getPointer()