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 DebugDirectoryEntry
{
///
/// 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;
}
}