LIEF: Library to Instrument Executable Formats Version 1.0.0
Loading...
Searching...
No Matches
LIEF::pdb::CompilationUnit Class Reference

This class represents a CompilationUnit (or Module) in a PDB file. More...

#include <CompilationUnit.hpp>

Classes

class  Iterator

Public Types

using sources_iterator
 Iterator over the source files (std::string).
using function_iterator = iterator_range<Function::Iterator>

Public Member Functions

 CompilationUnit (std::unique_ptr< details::CompilationUnit > impl)
 ~CompilationUnit ()
std::string module_name () const
 Name (or path) to the COFF object (.obj) associated with this compilation unit (e.g. e:\obj.amd64fre\minkernel\ntos\hvl\mp\objfre\amd64\hvlp.obj).
std::string object_filename () const
 Name or path to the original binary object (COFF, Archive) in which the compilation unit was located before being linked. e.g. e:\obj.amd64fre\minkernel\ntos\hvl\mp\objfre\amd64\hvl.lib.
sources_iterator sources () const
 Iterator over the sources files that compose this compilation unit. These files also include headers (.h, .hpp, ...).
function_iterator functions () const
 Return an iterator over the function defined in this compilation unit. If the PDB does not contain or has an empty DBI stream, it returns an empty iterator.
std::unique_ptr< BuildMetadatabuild_metadata () const
 Return build metadata such as the version of the compiler or the original source language of this compilation unit.
std::string to_decl (const DeclOpt &opt=DeclOpt()) const
 Generate a C/C++ definition for the functions defined in this compilation unit.
std::string to_string () const

Detailed Description

This class represents a CompilationUnit (or Module) in a PDB file.

Member Typedef Documentation

◆ function_iterator

◆ sources_iterator

Initial value:

Iterator over the source files (std::string).

Constructor & Destructor Documentation

◆ CompilationUnit()

LIEF::pdb::CompilationUnit::CompilationUnit ( std::unique_ptr< details::CompilationUnit > impl)

◆ ~CompilationUnit()

LIEF::pdb::CompilationUnit::~CompilationUnit ( )

References CompilationUnit().

Member Function Documentation

◆ build_metadata()

std::unique_ptr< BuildMetadata > LIEF::pdb::CompilationUnit::build_metadata ( ) const

Return build metadata such as the version of the compiler or the original source language of this compilation unit.

References build_metadata(), and LIEF_LIFETIMEBOUND.

Referenced by build_metadata().

◆ functions()

function_iterator LIEF::pdb::CompilationUnit::functions ( ) const

Return an iterator over the function defined in this compilation unit. If the PDB does not contain or has an empty DBI stream, it returns an empty iterator.

References functions(), and LIEF_LIFETIMEBOUND.

Referenced by functions().

◆ module_name()

std::string LIEF::pdb::CompilationUnit::module_name ( ) const

Name (or path) to the COFF object (.obj) associated with this compilation unit (e.g. e:\obj.amd64fre\minkernel\ntos\hvl\mp\objfre\amd64\hvlp.obj).

References module_name().

Referenced by module_name().

◆ object_filename()

std::string LIEF::pdb::CompilationUnit::object_filename ( ) const

Name or path to the original binary object (COFF, Archive) in which the compilation unit was located before being linked. e.g. e:\obj.amd64fre\minkernel\ntos\hvl\mp\objfre\amd64\hvl.lib.

References object_filename().

Referenced by object_filename().

◆ sources()

sources_iterator LIEF::pdb::CompilationUnit::sources ( ) const

Iterator over the sources files that compose this compilation unit. These files also include headers (.h, .hpp, ...).

References LIEF_LIFETIMEBOUND, and sources().

Referenced by sources().

◆ to_decl()

std::string LIEF::pdb::CompilationUnit::to_decl ( const DeclOpt & opt = DeclOpt()) const

Generate a C/C++ definition for the functions defined in this compilation unit.

References to_decl().

Referenced by to_decl().

◆ to_string()

std::string LIEF::pdb::CompilationUnit::to_string ( ) const

References to_string().

Referenced by to_string().


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