retdec
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
retdec::debugformat::DebugFormat Class Reference

#include <debugformat.h>

Inheritance diagram for retdec::debugformat::DebugFormat:
Inheritance graph
[legend]
Collaboration diagram for retdec::debugformat::DebugFormat:
Collaboration graph
[legend]

Public Types

using SymbolTable = std::map< retdec::common::Address, const retdec::fileformat::Symbol * >
 

Public Member Functions

 DebugFormat ()
 
 DebugFormat (retdec::loader::Image *inFile, const std::string &pdbFile, SymbolTable *symtab, retdec::demangler::Demangler *demangler)
 
retdec::common::FunctiongetFunction (retdec::common::Address a)
 
const retdec::common::ObjectgetGlobalVar (retdec::common::Address a)
 
bool hasInformation () const
 

Public Attributes

retdec::common::GlobalVarContainer globals
 
retdec::common::TypeContainer types
 
std::map< retdec::common::Address, retdec::common::Functionfunctions
 

Private Member Functions

void loadPdb ()
 
void loadPdbTypes ()
 
void loadPdbGlobalVariables ()
 
void loadPdbFunctions ()
 
retdec::common::Type loadPdbType (retdec::pdbparser::PDBTypeDef *type)
 
void loadDwarf ()
 
void loadDwarf_CU (llvm::DWARFDie die)
 
retdec::common::Function loadDwarf_subprogram (llvm::DWARFDie die)
 
std::string loadDwarf_type (llvm::DWARFDie die)
 
std::string _loadDwarf_type (llvm::DWARFDie die)
 
retdec::common::Object loadDwarf_formal_parameter (llvm::DWARFDie die, unsigned argCntr)
 
retdec::common::Object loadDwarf_variable (llvm::DWARFDie die)
 
void loadSymtab ()
 

Private Attributes

std::string _inputFile
 Input file used to initialize this debug information. More...
 
SymbolTable_symtab = nullptr
 Symbol table to read symbols from. More...
 
retdec::loader::Image_inFile = nullptr
 Underlying binary file representation. More...
 
retdec::pdbparser::PDBFile_pdbFile = nullptr
 Underlying PDB representation. More...
 
retdec::demangler::Demangler_demangler = nullptr
 Demangler. More...
 
std::map< std::pair< llvm::DWARFUnit *, uint32_t >, std::string > dieOff2type
 Dwarf named types cache. More...
 

Detailed Description

Common (PDB and DWARF) debug information representation.

Member Typedef Documentation

◆ SymbolTable

Constructor & Destructor Documentation

◆ DebugFormat() [1/2]

retdec::debugformat::DebugFormat::DebugFormat ( )

◆ DebugFormat() [2/2]

retdec::debugformat::DebugFormat::DebugFormat ( retdec::loader::Image inFile,
const std::string &  pdbFile,
SymbolTable symtab,
retdec::demangler::Demangler demangler 
)
Parameters
inFileParsed file format representation of inputFile.
pdbFileInput PDB file to load debugging information from.
symtabSymbol table.
demanglerDemangled instance used for this input file.

Member Function Documentation

◆ _loadDwarf_type()

std::string retdec::debugformat::DebugFormat::_loadDwarf_type ( llvm::DWARFDie  die)
private

◆ getFunction()

retdec::common::Function * retdec::debugformat::DebugFormat::getFunction ( retdec::common::Address  a)

◆ getGlobalVar()

const retdec::common::Object * retdec::debugformat::DebugFormat::getGlobalVar ( retdec::common::Address  a)

◆ hasInformation()

bool retdec::debugformat::DebugFormat::hasInformation ( ) const
Returns
True if debug info was loaded successfully from PDB or DWARF. False otherwise.

◆ loadDwarf()

void retdec::debugformat::DebugFormat::loadDwarf ( )
private

◆ loadDwarf_CU()

void retdec::debugformat::DebugFormat::loadDwarf_CU ( llvm::DWARFDie  die)
private

◆ loadDwarf_formal_parameter()

retdec::common::Object retdec::debugformat::DebugFormat::loadDwarf_formal_parameter ( llvm::DWARFDie  die,
unsigned  argCntr 
)
private

◆ loadDwarf_subprogram()

retdec::common::Function retdec::debugformat::DebugFormat::loadDwarf_subprogram ( llvm::DWARFDie  die)
private

◆ loadDwarf_type()

std::string retdec::debugformat::DebugFormat::loadDwarf_type ( llvm::DWARFDie  die)
private

processing.

◆ loadDwarf_variable()

retdec::common::Object retdec::debugformat::DebugFormat::loadDwarf_variable ( llvm::DWARFDie  die)
private

◆ loadPdb()

void retdec::debugformat::DebugFormat::loadPdb ( )
private

◆ loadPdbFunctions()

void retdec::debugformat::DebugFormat::loadPdbFunctions ( )
private

◆ loadPdbGlobalVariables()

void retdec::debugformat::DebugFormat::loadPdbGlobalVariables ( )
private

◆ loadPdbType()

retdec::common::Type retdec::debugformat::DebugFormat::loadPdbType ( retdec::pdbparser::PDBTypeDef type)
private

Convert PDB type representation into common type representation.

Parameters
typePDB type.
Returns
Common type representation.

◆ loadPdbTypes()

void retdec::debugformat::DebugFormat::loadPdbTypes ( )
private

◆ loadSymtab()

void retdec::debugformat::DebugFormat::loadSymtab ( )
private

TODO: move to own module.

Member Data Documentation

◆ _demangler

retdec::demangler::Demangler* retdec::debugformat::DebugFormat::_demangler = nullptr
private

Demangler.

◆ _inFile

retdec::loader::Image* retdec::debugformat::DebugFormat::_inFile = nullptr
private

Underlying binary file representation.

◆ _inputFile

std::string retdec::debugformat::DebugFormat::_inputFile
private

Input file used to initialize this debug information.

◆ _pdbFile

retdec::pdbparser::PDBFile* retdec::debugformat::DebugFormat::_pdbFile = nullptr
private

Underlying PDB representation.

◆ _symtab

SymbolTable* retdec::debugformat::DebugFormat::_symtab = nullptr
private

Symbol table to read symbols from.

◆ dieOff2type

std::map<std::pair<llvm::DWARFUnit*, uint32_t>, std::string> retdec::debugformat::DebugFormat::dieOff2type
private

Dwarf named types cache.

◆ functions

std::map<retdec::common::Address, retdec::common::Function> retdec::debugformat::DebugFormat::functions

◆ globals

retdec::common::GlobalVarContainer retdec::debugformat::DebugFormat::globals

◆ types

retdec::common::TypeContainer retdec::debugformat::DebugFormat::types

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