LIEF: Library to Instrument Executable Formats Version 0.15.1
Loading...
Searching...
No Matches
LIEF::dwarf::DebugInfo Class Reference

This class represents a DWARF debug information. It can embed different compilation units which can be accessed through compilation_units() . More...

#include <DebugInfo.hpp>

Inheritance diagram for LIEF::dwarf::DebugInfo:
Collaboration diagram for LIEF::dwarf::DebugInfo:

Public Types

using compilation_units_it = iterator_range<CompilationUnit::Iterator>
 Iterator over the CompilationUnit.
 
- Public Types inherited from LIEF::DebugInfo
enum class  FORMAT { UNKNOWN = 0 , DWARF , PDB }
 

Public Member Functions

std::unique_ptr< Functionfind_function (const std::string &name) const
 Try to find the function with the given name (mangled or not)
 
std::unique_ptr< Functionfind_function (uint64_t addr) const
 Try to find the function at the given virtual address.
 
std::unique_ptr< Variablefind_variable (const std::string &name) const
 Try to find the variable with the given name. This name can be mangled or not.
 
std::unique_ptr< Variablefind_variable (uint64_t addr) const
 Try to find the variable at the given virtual address.
 
std::unique_ptr< Typefind_type (const std::string &name) const
 Try to find the type with the given name.
 
compilation_units_it compilation_units () const
 Iterator on the CompilationUnit embedded in this dwarf.
 
FORMAT format () const override
 
 ~DebugInfo () override=default
 
- Public Member Functions inherited from LIEF::DebugInfo
 DebugInfo (std::unique_ptr< details::DebugInfo > impl)
 

Static Public Member Functions

static std::unique_ptr< DebugInfofrom_file (const std::string &path)
 
static bool classof (const LIEF::DebugInfo *info)
 

Detailed Description

This class represents a DWARF debug information. It can embed different compilation units which can be accessed through compilation_units() .

This class can be instantiated from LIEF::Binary::debug_info() or load()

Member Typedef Documentation

◆ compilation_units_it

Constructor & Destructor Documentation

◆ ~DebugInfo()

LIEF::dwarf::DebugInfo::~DebugInfo ( )
overridevirtualdefault

Reimplemented from LIEF::DebugInfo.

Member Function Documentation

◆ classof()

static bool LIEF::dwarf::DebugInfo::classof ( const LIEF::DebugInfo * info)
inlinestatic

◆ compilation_units()

compilation_units_it LIEF::dwarf::DebugInfo::compilation_units ( ) const

Iterator on the CompilationUnit embedded in this dwarf.

◆ find_function() [1/2]

std::unique_ptr< Function > LIEF::dwarf::DebugInfo::find_function ( const std::string & name) const

Try to find the function with the given name (mangled or not)

const DebugInfo& info = ...;
if (auto func = info.find_function("_ZNSt6localeD1Ev")) {
// Found
}
if (auto func = info.find_function("std::locale::~locale()")) {
// Found
}
This class represents a DWARF debug information. It can embed different compilation units which can b...
Definition DWARF/DebugInfo.hpp:36
std::unique_ptr< Function > find_function(const std::string &name) const
Try to find the function with the given name (mangled or not)

◆ find_function() [2/2]

std::unique_ptr< Function > LIEF::dwarf::DebugInfo::find_function ( uint64_t addr) const

Try to find the function at the given virtual address.

◆ find_type()

std::unique_ptr< Type > LIEF::dwarf::DebugInfo::find_type ( const std::string & name) const

Try to find the type with the given name.

◆ find_variable() [1/2]

std::unique_ptr< Variable > LIEF::dwarf::DebugInfo::find_variable ( const std::string & name) const

Try to find the variable with the given name. This name can be mangled or not.

◆ find_variable() [2/2]

std::unique_ptr< Variable > LIEF::dwarf::DebugInfo::find_variable ( uint64_t addr) const

Try to find the variable at the given virtual address.

◆ format()

FORMAT LIEF::dwarf::DebugInfo::format ( ) const
inlineoverridevirtual

Reimplemented from LIEF::DebugInfo.

References LIEF::DebugInfo::DWARF.

◆ from_file()

static std::unique_ptr< DebugInfo > LIEF::dwarf::DebugInfo::from_file ( const std::string & path)
static

Referenced by LIEF::dwarf::load().


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