retdec
Static Public Member Functions | Private Types | Static Private Attributes | List of all members
retdec::bin2llvmir::DebugFormatProvider Class Reference

#include <debugformat.h>

Collaboration diagram for retdec::bin2llvmir::DebugFormatProvider:
Collaboration graph
[legend]

Static Public Member Functions

static DebugFormataddDebugFormat (llvm::Module *m, retdec::loader::Image *objf, const std::string &pdbFile, Demangler *demangler)
 
static DebugFormatgetDebugFormat (llvm::Module *m)
 
static bool getDebugFormat (llvm::Module *m, DebugFormat *&df)
 
static void clear ()
 

Private Types

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

Static Private Attributes

static std::map< llvm::Module *, DebugFormat_module2debug
 Mapping of modules to debug info associated with them. More...
 

Detailed Description

Completely static object – all members and methods are static -> it can be used by anywhere in bin2llvmirl. It provides mapping of modules to debug info associated with them.

Attention
Even though this is accessible anywhere in bin2llvmirl, use it only in LLVM passes' prologs to initialize pass-local demangler object. All analyses, utils and other modules MUST NOT use it. If they need to work with debug info, they should accept it in parameter.

Member Typedef Documentation

◆ SymbolTable

Member Function Documentation

◆ addDebugFormat()

DebugFormat * retdec::bin2llvmir::DebugFormatProvider::addDebugFormat ( llvm::Module *  m,
retdec::loader::Image objf,
const std::string &  pdbFile,
Demangler demangler 
)
static

Create and add to provider a debug info for the given module m, file image objf, pdb file path pdbFile, and demangler demangler.

Returns
Created and added debug ingo or nullptr if something went wrong and it was not successfully created.

◆ clear()

void retdec::bin2llvmir::DebugFormatProvider::clear ( )
static

Clear all stored data.

◆ getDebugFormat() [1/2]

DebugFormat * retdec::bin2llvmir::DebugFormatProvider::getDebugFormat ( llvm::Module *  m)
static
Returns
Get debug info associated with the given module m or nullptr if there is no associated debug info.

◆ getDebugFormat() [2/2]

bool retdec::bin2llvmir::DebugFormatProvider::getDebugFormat ( llvm::Module *  m,
DebugFormat *&  df 
)
static

Get debug info d associated with the module m.

Parameters
[in]mModule for which to get debug info.
[out]dfSet to debug info associated with m module, or nullptr if there is no associated debug info.
Returns
True if debug info d was set ok and can be used. False otherwise.

Member Data Documentation

◆ _module2debug

std::map< Module *, DebugFormat > retdec::bin2llvmir::DebugFormatProvider::_module2debug
staticprivate

Mapping of modules to debug info associated with them.


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