mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-02-14 05:36:07 +00:00
Add PE partial debug table parsing
This commit is contained in:
38
BurnOutSharp.Models/PortableExecutable/DebugTable.cs
Normal file
38
BurnOutSharp.Models/PortableExecutable/DebugTable.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace BurnOutSharp.Models.PortableExecutable
|
||||
{
|
||||
/// <summary>
|
||||
/// The .debug section is used in object files to contain compiler-generated debug
|
||||
/// information and in image files to contain all of the debug information that is
|
||||
/// generated. This section describes the packaging of debug information in object
|
||||
/// and image files.
|
||||
///
|
||||
/// The next section describes the format of the debug directory, which can be
|
||||
/// anywhere in the image. Subsequent sections describe the "groups" in object
|
||||
/// files that contain debug information.
|
||||
///
|
||||
/// The default for the linker is that debug information is not mapped into the
|
||||
/// address space of the image. A .debug section exists only when debug information
|
||||
/// is mapped in the address space.
|
||||
/// </summary>
|
||||
/// <see href="https://learn.microsoft.com/en-us/windows/win32/debug/pe-format"/>
|
||||
public class DebugTable
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
public DebugDirectoryEntry[] DebugDirectoryTable;
|
||||
}
|
||||
}
|
||||
@@ -68,6 +68,11 @@ namespace BurnOutSharp.Models.PortableExecutable
|
||||
// the object file contains managed code. The format of the metadata is not
|
||||
// documented, but can be handed to the CLR interfaces for handling metadata.
|
||||
|
||||
/// <summary>
|
||||
/// Debug table (.debug*)
|
||||
/// </summary>
|
||||
public DebugTable DebugTable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Export table (.edata)
|
||||
/// </summary>
|
||||
@@ -101,9 +106,6 @@ namespace BurnOutSharp.Models.PortableExecutable
|
||||
// - Delay Import Name Table
|
||||
// - Delay Bound Import Address Table
|
||||
// - Delay Unload Import Address Table
|
||||
// - The .debug Section
|
||||
// - [Debug Directory Entry]
|
||||
// - .debug$F (Object Only) / IMAGE_DEBUG_TYPE_FPO
|
||||
// - The .drectve Section (Object Only)
|
||||
// - The .pdata Section [Multiple formats per entry]
|
||||
// - TLS Callback Functions
|
||||
|
||||
Reference in New Issue
Block a user