diff --git a/BurnOutSharp.Models/PortableExecutable/DebugDirectory.cs b/BurnOutSharp.Models/PortableExecutable/DebugDirectory.cs new file mode 100644 index 00000000..d247c9de --- /dev/null +++ b/BurnOutSharp.Models/PortableExecutable/DebugDirectory.cs @@ -0,0 +1,66 @@ +using System.Runtime.InteropServices; + +namespace BurnOutSharp.Models.PortableExecutable +{ + /// + /// Image files contain an optional debug directory that indicates what form + /// of debug information is present and where it is. This directory consists + /// of an array of debug directory entries whose location and size are indicated + /// in the image optional header. + /// + /// The debug directory can be in a discardable .debug section (if one exists), + /// or it can be included in any other section in the image file, or not be in + /// a section at all. + /// + /// Each debug directory entry identifies the location and size of a block of + /// debug information. The specified RVA can be zero if the debug information + /// is not covered by a section header (that is, it resides in the image file + /// and is not mapped into the run-time address space). If it is mapped, the + /// RVA is its address. + /// + /// + [StructLayout(LayoutKind.Sequential)] + public class DebugDirectory + { + /// + /// Reserved, must be zero. + /// + public uint Characteristics; + + /// + /// The time and date that the debug data was created. + /// + public uint TimeDateStamp; + + /// + /// The major version number of the debug data format. + /// + public ushort MajorVersion; + + /// + /// The minor version number of the debug data format. + /// + public ushort MinorVersion; + + /// + /// The format of debugging information. This field enables support + /// of multiple debuggers. + /// + public DebugType DebugType; + + /// + /// The size of the debug data (not including the debug directory itself). + /// + public uint SizeOfData; + + /// + /// The address of the debug data when loaded, relative to the image base. + /// + public uint AddressOfRawData; + + /// + /// The file pointer to the debug data. + /// + public uint PointerToRawData; + } +} diff --git a/BurnOutSharp.Models/PortableExecutable/Executable.cs b/BurnOutSharp.Models/PortableExecutable/Executable.cs index fabefbbc..2c7c8caa 100644 --- a/BurnOutSharp.Models/PortableExecutable/Executable.cs +++ b/BurnOutSharp.Models/PortableExecutable/Executable.cs @@ -56,6 +56,6 @@ namespace BurnOutSharp.Models.PortableExecutable /// public DelayLoadDirectoryTableEntry[] DelayLoadDirectoryTable { get; set; } - // TODO: Left off at "Special Sections" + // TODO: Left off at "Export Directory Table" } }