mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-09-22 14:54:56 +00:00
Add LE/LX debug information
This commit is contained in:
36
BurnOutSharp.Models/LinearExecutable/DebugInformation.cs
Normal file
36
BurnOutSharp.Models/LinearExecutable/DebugInformation.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace BurnOutSharp.Models.LinearExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// The debug information is defined by the debugger and is not controlled by
|
||||
/// the linear EXE format or linker. The only data defined by the linear EXE
|
||||
/// format relative to the debug information is it's offset in the EXE file and
|
||||
/// length in bytes as defined in the linear EXE header.
|
||||
///
|
||||
/// To support multiple debuggers the first word of the debug information is a
|
||||
/// type field which determines the format of the debug information.
|
||||
/// </summary>
|
||||
/// <see href="https://faydoc.tripod.com/formats/exe-LE.htm"/>
|
||||
/// <see href="http://www.edm2.com/index.php/LX_-_Linear_eXecutable_Module_Format_Description"/>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public class DebugInformation
|
||||
{
|
||||
/// <summary>
|
||||
/// The signature consists of a string of three (3) ASCII characters: "NB0"
|
||||
/// </summary>
|
||||
public byte[] Signature;
|
||||
|
||||
/// <summary>
|
||||
/// This defines the type of debugger data that exists in the remainder of the
|
||||
/// debug information.
|
||||
/// </summary>
|
||||
public DebugFormatType FormatType;
|
||||
|
||||
// DEBUGGER DATA = Debugger specific data.
|
||||
// The format of the debugger data is defined by the debugger that is being used.
|
||||
// The values defined for the type field are not enforced by the system. It is
|
||||
// the responsibility of the linker or debugging tools to follow the convention
|
||||
// for the type field that is defined here.
|
||||
}
|
||||
}
|
||||
@@ -102,6 +102,29 @@ namespace BurnOutSharp.Models.LinearExecutable
|
||||
MIPSMarkIII = 0x42,
|
||||
}
|
||||
|
||||
public enum DebugFormatType : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// 32-bit CodeView debugger format.
|
||||
/// </summary>
|
||||
CodeView32Bit = 0x00,
|
||||
|
||||
/// <summary>
|
||||
/// AIX debugger format.
|
||||
/// </summary>
|
||||
AIXDebugger = 0x01,
|
||||
|
||||
/// <summary>
|
||||
/// 16-bit CodeView debugger format.
|
||||
/// </summary>
|
||||
CodeView16Bit = 0x02,
|
||||
|
||||
/// <summary>
|
||||
/// 32-bit OS/2 PM debugger (IBM) format.
|
||||
/// </summary>
|
||||
OS2PM32Bit = 0x04,
|
||||
}
|
||||
|
||||
public enum DirectiveNumber : ushort
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -82,6 +82,10 @@ namespace BurnOutSharp.Models.LinearExecutable
|
||||
public NonResidentNameTableEntry[] NonResidentNameTable { get; set; }
|
||||
|
||||
// TODO: Non-resident directives data
|
||||
// TODO: Debug Info
|
||||
|
||||
/// <summary>
|
||||
/// Debug information
|
||||
/// </summary>
|
||||
public DebugInformation DebugInformation { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user