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
FieldsModifier and TypeFieldDescriptionstatic final intThe size of theIMAGE_DEBUG_DIRECTORY, in bytes.static final StringThe name to use when converting into a structure data type. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the address of the debugging information when the image is loaded, relative to the image base.intReserved.Returns a description of this debug directory.intReturns the major version number of the debugging information format.intReturns the minor version number of the debugging information format.intReturns the file pointer to the debugging information.intReturns the size of the debugging information, in bytes.intReturns the time and date the debugging information was created.intgetType()Returns the format of the debugging information.voidsetDescription(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.voidupdatePointers(int offset, int postOffset) voidwriteHeader(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:StructConverterReturns 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:
toDataTypein 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:ByteArrayConverterReturns a byte array representing this implementor of this interface.- Specified by:
toBytesin interfaceByteArrayConverter- Parameters:
dc- the data converter to use- Returns:
- a byte array representing this object
-
updatePointers
public void updatePointers(int offset, int postOffset)
-