Class DebugDirectoryParser
java.lang.Object
ghidra.app.util.bin.format.pe.debug.DebugDirectoryParser
- All Implemented Interfaces:
OffsetValidator
A helper class to parsing different types of
debug information from a debug directory
-
Field Summary
Modifier and TypeFieldDescriptionstatic final byte
Borland debug type.static final byte
CLS ID debug type.static final byte
CodeView debug type.static final byte
COFF debug type.static final byte
Exception debug type.static final byte
Fixup debug type.static final byte
FPO debug type.static final byte
Misc debug type.static final byte
OMAP-From-Source debug type.static final byte
OMAP-To-Source debug type.static final byte
Reserved debug type.static final byte
Unknown debug type. -
Constructor Summary
ConstructorDescriptionDebugDirectoryParser
(BinaryReader reader, long ptr, int size, long sizeOfImage) Constructs a new debug directory parser. -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkPointer
(long ptr) boolean
checkRVA
(long rva) Returns the CodeView debug information, or null if it does not exists.Returns the COFF debug information, or null if it does not exists.Returns the Fixup debug information, or null if it does not exists.Returns the miscellaneous debug information, or null if it does not exists.
-
Field Details
-
IMAGE_DEBUG_TYPE_UNKNOWN
public static final byte IMAGE_DEBUG_TYPE_UNKNOWNUnknown debug type.- See Also:
-
IMAGE_DEBUG_TYPE_COFF
public static final byte IMAGE_DEBUG_TYPE_COFFCOFF debug type.- See Also:
-
IMAGE_DEBUG_TYPE_CODEVIEW
public static final byte IMAGE_DEBUG_TYPE_CODEVIEWCodeView debug type.- See Also:
-
IMAGE_DEBUG_TYPE_FPO
public static final byte IMAGE_DEBUG_TYPE_FPOFPO debug type.- See Also:
-
IMAGE_DEBUG_TYPE_MISC
public static final byte IMAGE_DEBUG_TYPE_MISCMisc debug type.- See Also:
-
IMAGE_DEBUG_TYPE_EXCEPTION
public static final byte IMAGE_DEBUG_TYPE_EXCEPTIONException debug type.- See Also:
-
IMAGE_DEBUG_TYPE_FIXUP
public static final byte IMAGE_DEBUG_TYPE_FIXUPFixup debug type.- See Also:
-
IMAGE_DEBUG_TYPE_OMAP_TO_SRC
public static final byte IMAGE_DEBUG_TYPE_OMAP_TO_SRCOMAP-To-Source debug type.- See Also:
-
IMAGE_DEBUG_TYPE_OMAP_FROM_SRC
public static final byte IMAGE_DEBUG_TYPE_OMAP_FROM_SRCOMAP-From-Source debug type.- See Also:
-
IMAGE_DEBUG_TYPE_BORLAND
public static final byte IMAGE_DEBUG_TYPE_BORLANDBorland debug type.- See Also:
-
IMAGE_DEBUG_TYPE_RESERVED10
public static final byte IMAGE_DEBUG_TYPE_RESERVED10Reserved debug type.- See Also:
-
IMAGE_DEBUG_TYPE_CLSID
public static final byte IMAGE_DEBUG_TYPE_CLSIDCLS ID debug type.- See Also:
-
-
Constructor Details
-
DebugDirectoryParser
public DebugDirectoryParser(BinaryReader reader, long ptr, int size, long sizeOfImage) throws IOException Constructs a new debug directory parser.- Parameters:
reader
- the binary readerptr
- the pointer into the binary readersize
- the size of the directorysizeOfImage
- the size of the image in memory- Throws:
IOException
- if an I/O error occurs
-
-
Method Details
-
getDebugDirectories
-
getDebugMisc
Returns the miscellaneous debug information, or null if it does not exists.- Returns:
- the miscellaneous debug information
-
getDebugCodeView
Returns the CodeView debug information, or null if it does not exists.- Returns:
- the CodeView debug information
-
getDebugCOFFSymbolsHeader
Returns the COFF debug information, or null if it does not exists.- Returns:
- the COFF debug information
-
getDebugFixup
Returns the Fixup debug information, or null if it does not exists.- Returns:
- the Fixup debug information
-
checkPointer
public boolean checkPointer(long ptr) - Specified by:
checkPointer
in interfaceOffsetValidator
-
checkRVA
public boolean checkRVA(long rva) - Specified by:
checkRVA
in interfaceOffsetValidator
-