Class SeparateDebugHeader
java.lang.Object
ghidra.app.util.bin.format.pe.SeparateDebugHeader
- All Implemented Interfaces:
OffsetValidator
typedef struct _IMAGE_SEPARATE_DEBUG_HEADER {
WORD Signature;
WORD Flags;
WORD Machine;
WORD Characteristics;
DWORD TimeDateStamp;
DWORD CheckSum;
DWORD ImageBase;
DWORD SizeOfImage;
DWORD NumberOfSections;
DWORD ExportedNamesSize;
DWORD DebugDirectorySize;
DWORD SectionAlignment;
DWORD Reserved[2];
} IMAGE_SEPARATE_DEBUG_HEADER, *PIMAGE_SEPARATE_DEBUG_HEADER;
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe magic number for separate debug files.static final intThe magic number for separate debug files on MAC. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new separate debug header using the specified byte provider. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckPointer(long ptr) Returns whether or not the specified pointer is contained within the PE file.booleancheckRVA(long rva) Returns whether or not the specified RVA value is contained within the PE image.shortReturns the characteristics.intReturns the check sum.intReturns the debug directory size.intReturns the exported names size.intReturns the PE's file alignment, or 0 if unknown/unused.shortgetFlags()Returns the flags.intReturns the image base.shortReturns the machine type (or processor).Returns the machine name (or processor name).intReturns the number of sections.Returns the debug directory parser.int[]Returns the reserved int array.intReturns the section alignment value.shortReturns the signature (or magic number).intReturns the size of the image.intReturns the time date stamp.
-
Field Details
-
IMAGE_SEPARATE_DEBUG_SIGNATURE
public static final int IMAGE_SEPARATE_DEBUG_SIGNATUREThe magic number for separate debug files.- See Also:
-
IMAGE_SEPARATE_DEBUG_SIGNATURE_MAC
public static final int IMAGE_SEPARATE_DEBUG_SIGNATURE_MACThe magic number for separate debug files on MAC.- See Also:
-
-
Constructor Details
-
SeparateDebugHeader
Constructs a new separate debug header using the specified byte provider.- Parameters:
bp- the byte provider- Throws:
IOException- if an I/O error occurs.
-
-
Method Details
-
getCharacteristics
public short getCharacteristics()Returns the characteristics.- Returns:
- the characteristics
-
getCheckSum
public int getCheckSum()Returns the check sum.- Returns:
- the check sum
-
getDebugDirectorySize
public int getDebugDirectorySize()Returns the debug directory size.- Returns:
- the debug directory size
-
getExportedNamesSize
public int getExportedNamesSize()Returns the exported names size.- Returns:
- the exported names size
-
getFlags
public short getFlags()Returns the flags.- Returns:
- the flags
-
getImageBase
public int getImageBase()Returns the image base.- Returns:
- the image base
-
getMachine
public short getMachine()Returns the machine type (or processor).- Returns:
- the machine type
-
getMachineName
Returns the machine name (or processor name).- Returns:
- the machine name
-
getNumberOfSections
public int getNumberOfSections()Returns the number of sections.- Returns:
- the number of sections
-
getReserved
public int[] getReserved()Returns the reserved int array.- Returns:
- the reserved int array
-
getSectionAlignment
public int getSectionAlignment()Returns the section alignment value.- Specified by:
getSectionAlignmentin interfaceOffsetValidator- Returns:
- the section alignment value
-
getFileAlignment
public int getFileAlignment()Description copied from interface:OffsetValidatorReturns the PE's file alignment, or 0 if unknown/unused.- Specified by:
getFileAlignmentin interfaceOffsetValidator- Returns:
- the PE's file alignment, or 0 if unknown/unused
-
getSignature
public short getSignature()Returns the signature (or magic number).- Returns:
- the signature
-
getSizeOfImage
public int getSizeOfImage()Returns the size of the image.- Returns:
- the size of the image
-
getTimeDateStamp
public int getTimeDateStamp()Returns the time date stamp.- Returns:
- the time date stamp
-
getParser
Returns the debug directory parser.- Returns:
- the debug directory parser
-
checkPointer
public boolean checkPointer(long ptr) Description copied from interface:OffsetValidatorReturns whether or not the specified pointer is contained within the PE file.- Specified by:
checkPointerin interfaceOffsetValidator- Parameters:
ptr- the pointer value to check- Returns:
- whether or not the specified pointer is contained within the PE file
-
checkRVA
public boolean checkRVA(long rva) Description copied from interface:OffsetValidatorReturns whether or not the specified RVA value is contained within the PE image.- Specified by:
checkRVAin interfaceOffsetValidator- Parameters:
rva- the RVA to check- Returns:
- whether or not the specified RVA value is contained within the PE image
-