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

CodeView PDB specialization. More...

#include <CodeViewPDB.hpp>

Inheritance diagram for LIEF::PE::CodeViewPDB:
Collaboration diagram for LIEF::PE::CodeViewPDB:

Public Types

using signature_t = std::array<uint8_t, 16>
Public Types inherited from LIEF::PE::CodeView
enum class  SIGNATURES {
  UNKNOWN = 0 , PDB_70 = 0x53445352 , PDB_20 = 0x3031424e , CV_50 = 0x3131424e ,
  CV_41 = 0x3930424e
}
 Code view signatures. More...
enum class  KIND { GENERIC = 0 , PDB }
 Discriminator for the subclasses. More...
Public Types inherited from LIEF::PE::Debug
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

 CodeViewPDB ()
 CodeViewPDB (std::string filename)
 CodeViewPDB (const details::pe_debug &debug_info, const details::pe_pdb_70 &pdb_70, Section *sec)
 CodeViewPDB (const details::pe_debug &debug_info, const details::pe_pdb_20 &pdb_70, Section *sec)
 CodeViewPDB (const CodeViewPDB &other)=default
CodeViewPDB & operator= (const CodeViewPDB &other)=default
 CodeViewPDB (CodeViewPDB &&other)=default
CodeViewPDB & operator= (CodeViewPDB &&other)=default
std::string guid () const
 The GUID signature to verify against the .pdb file signature. This attribute might be used to lookup remote PDB file on a symbol server.
uint32_t age () const
 Age value to verify. The age does not necessarily correspond to any known time value, it is used to determine if a .pdb file is out of sync with corresponding .exe file.
const signature_t & signature () const
 The 32-bit signature to verify against the .pdb file signature.
std::string_view filename () const
 The path to the .pdb file.
void age (uint32_t age)
void signature (const signature_t &sig)
void filename (std::string filename)
std::unique_ptr< Debug > clone () const override
void accept (Visitor &visitor) const override
std::string to_string () const override
 ~CodeViewPDB () override=default
Public Member Functions inherited from LIEF::PE::CodeView
 CodeView ()
 CodeView (SIGNATURES sig)
 CodeView (const details::pe_debug &debug, SIGNATURES sig, Section *sec)
 CodeView (const CodeView &other)=default
CodeView & operator= (const CodeView &other)=default
 CodeView (CodeView &&other)=default
CodeView & operator= (CodeView &&other)=default
 ~CodeView () override=default
SIGNATURES signature () const
 The signature that defines the underlying type of the payload.
KIND kind () const
 Determine the type of the concrete implementation.
Public Member Functions inherited from LIEF::PE::Debug
 Debug ()=default
 Debug (TYPES type)
 Debug (const details::pe_debug &debug_s, Section *section)
 Debug (const Debug &other)=default
Debug & operator= (const Debug &other)=default
 Debug (Debug &&)=default
Debug & operator= (Debug &&)=default
 ~Debug () override=default
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 Section * section () const
 The section where debug data is located.
Section * section ()
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 T * as () const
template<class T>
T * as ()
void accept (Visitor &visitor) const override
Public Member Functions inherited from LIEF::Object
 Object ()
 Object (const Object &other)
Object & operator= (const Object &other)
 Object (Object &&) noexcept=default
Object & operator= (Object &&) noexcept=default
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 bool classof (const Debug *debug)
Static Public Member Functions inherited from LIEF::PE::CodeView
static bool classof (const Debug *debug)
Static Public Member Functions inherited from LIEF::PE::Debug
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

CodeView PDB specialization.

Member Typedef Documentation

◆ signature_t

using LIEF::PE::CodeViewPDB::signature_t = std::array<uint8_t, 16>

Constructor & Destructor Documentation

◆ CodeViewPDB() [1/6]

LIEF::PE::CodeViewPDB::CodeViewPDB ( )
inline

◆ CodeViewPDB() [2/6]

LIEF::PE::CodeViewPDB::CodeViewPDB ( std::string filename)
inline

◆ CodeViewPDB() [3/6]

LIEF::PE::CodeViewPDB::CodeViewPDB ( const details::pe_debug & debug_info,
const details::pe_pdb_70 & pdb_70,
Section * sec )

◆ CodeViewPDB() [4/6]

LIEF::PE::CodeViewPDB::CodeViewPDB ( const details::pe_debug & debug_info,
const details::pe_pdb_20 & pdb_70,
Section * sec )

◆ CodeViewPDB() [5/6]

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

References CodeViewPDB().

◆ CodeViewPDB() [6/6]

LIEF::PE::CodeViewPDB::CodeViewPDB ( CodeViewPDB && other)
default

References CodeViewPDB().

◆ ~CodeViewPDB()

LIEF::PE::CodeViewPDB::~CodeViewPDB ( )
overridedefault

Member Function Documentation

◆ accept()

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

Reimplemented from LIEF::PE::CodeView.

◆ age() [1/2]

uint32_t LIEF::PE::CodeViewPDB::age ( ) const
inline

Age value to verify. The age does not necessarily correspond to any known time value, it is used to determine if a .pdb file is out of sync with corresponding .exe file.

Referenced by age().

◆ age() [2/2]

void LIEF::PE::CodeViewPDB::age ( uint32_t age)
inline

References age().

◆ classof()

bool LIEF::PE::CodeViewPDB::classof ( const Debug * debug)
inlinestatic

◆ clone()

std::unique_ptr< Debug > LIEF::PE::CodeViewPDB::clone ( ) const
inlineoverridevirtual

Reimplemented from LIEF::PE::CodeView.

References CodeViewPDB().

◆ filename() [1/2]

std::string_view LIEF::PE::CodeViewPDB::filename ( ) const
inline

The path to the .pdb file.

References LIEF_LIFETIMEBOUND.

Referenced by CodeViewPDB(), and filename().

◆ filename() [2/2]

void LIEF::PE::CodeViewPDB::filename ( std::string filename)
inline

References filename().

◆ guid()

std::string LIEF::PE::CodeViewPDB::guid ( ) const

The GUID signature to verify against the .pdb file signature. This attribute might be used to lookup remote PDB file on a symbol server.

◆ operator=() [1/2]

CodeViewPDB & LIEF::PE::CodeViewPDB::operator= ( CodeViewPDB && other)
default

References CodeViewPDB().

◆ operator=() [2/2]

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

References CodeViewPDB().

◆ signature() [1/2]

const signature_t & LIEF::PE::CodeViewPDB::signature ( ) const
inline

The 32-bit signature to verify against the .pdb file signature.

◆ signature() [2/2]

void LIEF::PE::CodeViewPDB::signature ( const signature_t & sig)
inline

◆ to_string()

std::string LIEF::PE::CodeViewPDB::to_string ( ) const
overridevirtual

Reimplemented from LIEF::PE::CodeView.


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