Class DebugDirectory
java.lang.Object
ghidra.app.util.bin.format.pe.debug.DebugDirectory
- All Implemented Interfaces:
ByteArrayConverter
,StructConverter
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 Summary
Modifier and TypeFieldDescriptionstatic final int
The size of theIMAGE_DEBUG_DIRECTORY
, in bytes.static final String
The name to use when converting into a structure data type. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the address of the debugging information when the image is loaded, relative to the image base.int
Reserved.Returns a description of this debug directory.int
Returns the major version number of the debugging information format.int
Returns the minor version number of the debugging information format.int
Returns the file pointer to the debugging information.int
Returns the size of the debugging information, in bytes.int
Returns the time and date the debugging information was created.int
getType()
Returns the format of the debugging information.void
setDescription
(String desc) Sets the description of this debug directory.byte[]
toBytes
(DataConverter dc) Returns a byte array representing this implementor of this interface.Returns a structure datatype representing the contents of the implementor of this interface.void
updatePointers
(int offset, int postOffset) void
writeHeader
(RandomAccessFile raf, DataConverter dc)
-
Field Details
-
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_DIRECTORYThe size of theIMAGE_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
Returns a description of this debug directory.- Returns:
- a description of this debug directory
-
setDescription
Sets the description of this debug directory.- Parameters:
desc
- the description of this debug directory
-
toDataType
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 interfaceStructConverter
- 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
- Throws:
IOException
-
toBytes
Description copied from interface:ByteArrayConverter
Returns a byte array representing this implementor of this interface.- Specified by:
toBytes
in interfaceByteArrayConverter
- Parameters:
dc
- the data converter to use- Returns:
- a byte array representing this object
-
updatePointers
public void updatePointers(int offset, int postOffset)
-