LIEF: Library to Instrument Executable Formats Version 0.17.0
Loading...
Searching...
No Matches
LIEF::PE::Debug Class Reference

This class represents a generic entry in the debug data directory. For known types, this class is extended to provide a dedicated API (see: CodeCodeView) More...

#include <Debug.hpp>

Inheritance diagram for LIEF::PE::Debug:
Collaboration diagram for LIEF::PE::Debug:

Public Types

enum class  TYPES {
  UNKNOWN = 0 , COFF = 1 , CODEVIEW = 2 , FPO = 3 ,
  MISC = 4 , EXCEPTION = 5 , FIXUP = 6 , OMAP_TO_SRC = 7 ,
  OMAP_FROM_SRC = 8 , BORLAND = 9 , RESERVED10 = 10 , CLSID = 11 ,
  VC_FEATURE = 12 , POGO = 13 , ILTCG = 14 , MPX = 15 ,
  REPRO = 16 , PDBCHECKSUM = 19 , EX_DLLCHARACTERISTICS = 20
}
 The entry types. More...
 
- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Public Member Functions

 Debug ()=default
 
 Debug (TYPES type)
 
 Debug (const details::pe_debug &debug_s, Section *section)
 
 Debug (const Debug &other)=default
 
Debugoperator= (const Debug &other)=default
 
 Debug (Debug &&)=default
 
Debugoperator= (Debug &&)=default
 
 ~Debug () override=default
 
virtual std::unique_ptr< Debugclone () const
 
uint32_t characteristics () const
 Reserved should be 0.
 
uint32_t timestamp () const
 The time and date when the debug data was created.
 
uint16_t major_version () const
 The major version number of the debug data format.
 
uint16_t minor_version () const
 The minor version number of the debug data format.
 
TYPES type () const
 The format DEBUG_TYPES of the debugging information.
 
uint32_t sizeof_data () const
 Size of the debug data.
 
uint32_t addressof_rawdata () const
 Address of the debug data relative to the image base.
 
uint32_t pointerto_rawdata () const
 File offset of the debug data.
 
const Sectionsection () const
 The section where debug data is located.
 
Sectionsection ()
 
span< uint8_t > payload ()
 Debug data associated with this entry.
 
span< const uint8_t > payload () const
 
void characteristics (uint32_t characteristics)
 
void timestamp (uint32_t timestamp)
 
void major_version (uint16_t major_version)
 
void minor_version (uint16_t minor_version)
 
void sizeof_data (uint32_t sizeof_data)
 
void addressof_rawdata (uint32_t addressof_rawdata)
 
void pointerto_rawdata (uint32_t pointerto_rawdata)
 
template<class T >
const Tas () const
 
template<class T >
Tas ()
 
void accept (Visitor &visitor) const override
 
virtual std::string to_string () const
 
- Public Member Functions inherited from LIEF::Object
 Object ()
 
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 
virtual ~Object ()
 

Static Public Member Functions

static span< uint8_t > get_payload (Section &section, uint32_t rva, uint32_t offset, uint32_t size)
 
static span< uint8_t > get_payload (Section &section, const details::pe_debug &hdr)
 
static span< uint8_t > get_payload (Section &section, const Debug &dbg)
 

Detailed Description

This class represents a generic entry in the debug data directory. For known types, this class is extended to provide a dedicated API (see: CodeCodeView)

Member Enumeration Documentation

◆ TYPES

enum class LIEF::PE::Debug::TYPES
strong

The entry types.

Enumerator
UNKNOWN 
COFF 

COFF Debug information.

CODEVIEW 

CodeView debug information that is used to store PDB info.

FPO 

Frame pointer omission information.

MISC 

Miscellaneous debug information.

EXCEPTION 

Debug information that is a copy of the .pdata section.

FIXUP 

(Reserved) Debug information used for fixup relocations

OMAP_TO_SRC 

The mapping from an RVA in image to an RVA in source image.

OMAP_FROM_SRC 

The mapping from an RVA in source image to an RVA in image.

BORLAND 

Reserved for Borland.

RESERVED10 

Reserved.

CLSID 

Reserved.

VC_FEATURE 

Visual C++ feature information.

POGO 

Profile Guided Optimization metadata.

ILTCG 

Incremental Link Time Code Generation metadata.

MPX 
REPRO 

PE determinism or reproducibility information.

PDBCHECKSUM 

Checksum of the PDB file.

EX_DLLCHARACTERISTICS 

Extended DLL characteristics.

Constructor & Destructor Documentation

◆ Debug() [1/5]

LIEF::PE::Debug::Debug ( )
default

◆ Debug() [2/5]

LIEF::PE::Debug::Debug ( TYPES type)
inline

◆ Debug() [3/5]

LIEF::PE::Debug::Debug ( const details::pe_debug & debug_s,
Section * section )

◆ Debug() [4/5]

LIEF::PE::Debug::Debug ( const Debug & other)
default

◆ Debug() [5/5]

LIEF::PE::Debug::Debug ( Debug && )
default

◆ ~Debug()

LIEF::PE::Debug::~Debug ( )
overridedefault

Member Function Documentation

◆ accept()

void LIEF::PE::Debug::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

Reimplemented in LIEF::PE::Pogo, and LIEF::PE::Repro.

◆ addressof_rawdata() [1/2]

uint32_t LIEF::PE::Debug::addressof_rawdata ( ) const
inline

Address of the debug data relative to the image base.

Referenced by get_payload().

◆ addressof_rawdata() [2/2]

void LIEF::PE::Debug::addressof_rawdata ( uint32_t addressof_rawdata)
inline

◆ as() [1/2]

template<class T >
T * LIEF::PE::Debug::as ( )
inline

References LIEF::PE::T.

◆ as() [2/2]

template<class T >
const T * LIEF::PE::Debug::as ( ) const
inline

References LIEF::PE::T.

◆ characteristics() [1/2]

uint32_t LIEF::PE::Debug::characteristics ( ) const
inline

Reserved should be 0.

◆ characteristics() [2/2]

void LIEF::PE::Debug::characteristics ( uint32_t characteristics)
inline

◆ clone()

virtual std::unique_ptr< Debug > LIEF::PE::Debug::clone ( ) const
inlinevirtual

◆ get_payload() [1/3]

static span< uint8_t > LIEF::PE::Debug::get_payload ( Section & section,
const Debug & dbg )
inlinestatic

◆ get_payload() [2/3]

static span< uint8_t > LIEF::PE::Debug::get_payload ( Section & section,
const details::pe_debug & hdr )
static

◆ get_payload() [3/3]

static span< uint8_t > LIEF::PE::Debug::get_payload ( Section & section,
uint32_t rva,
uint32_t offset,
uint32_t size )
static

◆ major_version() [1/2]

uint16_t LIEF::PE::Debug::major_version ( ) const
inline

The major version number of the debug data format.

◆ major_version() [2/2]

void LIEF::PE::Debug::major_version ( uint16_t major_version)
inline

◆ minor_version() [1/2]

uint16_t LIEF::PE::Debug::minor_version ( ) const
inline

The minor version number of the debug data format.

◆ minor_version() [2/2]

void LIEF::PE::Debug::minor_version ( uint16_t minor_version)
inline

◆ operator=() [1/2]

Debug & LIEF::PE::Debug::operator= ( const Debug & other)
default

◆ operator=() [2/2]

Debug & LIEF::PE::Debug::operator= ( Debug && )
default

◆ payload() [1/2]

span< uint8_t > LIEF::PE::Debug::payload ( )

Debug data associated with this entry.

◆ payload() [2/2]

span< const uint8_t > LIEF::PE::Debug::payload ( ) const
inline

◆ pointerto_rawdata() [1/2]

uint32_t LIEF::PE::Debug::pointerto_rawdata ( ) const
inline

File offset of the debug data.

Referenced by get_payload().

◆ pointerto_rawdata() [2/2]

void LIEF::PE::Debug::pointerto_rawdata ( uint32_t pointerto_rawdata)
inline

◆ section() [1/2]

Section * LIEF::PE::Debug::section ( )
inline

◆ section() [2/2]

const Section * LIEF::PE::Debug::section ( ) const
inline

The section where debug data is located.

◆ sizeof_data() [1/2]

uint32_t LIEF::PE::Debug::sizeof_data ( ) const
inline

Size of the debug data.

Referenced by get_payload().

◆ sizeof_data() [2/2]

void LIEF::PE::Debug::sizeof_data ( uint32_t sizeof_data)
inline

◆ timestamp() [1/2]

uint32_t LIEF::PE::Debug::timestamp ( ) const
inline

The time and date when the debug data was created.

◆ timestamp() [2/2]

void LIEF::PE::Debug::timestamp ( uint32_t timestamp)
inline

◆ to_string()

virtual std::string LIEF::PE::Debug::to_string ( ) const
virtual

◆ type()

TYPES LIEF::PE::Debug::type ( ) const
inline

The format DEBUG_TYPES of the debugging information.


The documentation for this class was generated from the following file: