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

#include <names.h>

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

Public Member Functions

 NameContainer (llvm::Module *m, Config *c, DebugFormat *d, FileImage *i, Demangler *dm, Lti *lti=nullptr)
 
bool addNameForAddress (retdec::common::Address a, const std::string &name, Name::eType type, Lti *lti=nullptr)
 
const NamesgetNamesForAddress (retdec::common::Address a)
 
const NamegetPreferredNameForAddress (retdec::common::Address a)
 

Private Types

using ImportOrdMap = std::map< int, std::string >
 <ordinal number, function name> More...
 

Private Member Functions

void initFromConfig ()
 
void initFromDebug ()
 
void initFromImage ()
 
std::string getNameFromImportLibAndOrd (const std::string &libName, int ord)
 
bool loadImportOrds (const std::string &libName)
 

Private Attributes

Config_config = nullptr
 
DebugFormat_debug = nullptr
 
FileImage_image = nullptr
 
Lti_lti = nullptr
 
std::map< retdec::common::Address, Names_data
 
std::map< std::string, ImportOrdMap_dllOrds
 <library name without suffix ".dll", map with ordinals> More...
 

Detailed Description

Names container.

Member Typedef Documentation

◆ ImportOrdMap

using retdec::bin2llvmir::NameContainer::ImportOrdMap = std::map<int, std::string>
private

<ordinal number, function name>

Constructor & Destructor Documentation

◆ NameContainer()

retdec::bin2llvmir::NameContainer::NameContainer ( llvm::Module *  m,
Config c,
DebugFormat d,
FileImage i,
Demangler dm,
Lti lti = nullptr 
)

Member Function Documentation

◆ addNameForAddress()

bool retdec::bin2llvmir::NameContainer::addNameForAddress ( retdec::common::Address  a,
const std::string &  name,
Name::eType  type,
Lti lti = nullptr 
)

Name is not added if a is undefined or name is empty.

Returns
True if name added, false otherwise.

◆ getNameFromImportLibAndOrd()

std::string retdec::bin2llvmir::NameContainer::getNameFromImportLibAndOrd ( const std::string &  libName,
int  ord 
)
private

◆ getNamesForAddress()

const Names & retdec::bin2llvmir::NameContainer::getNamesForAddress ( retdec::common::Address  a)

◆ getPreferredNameForAddress()

const Name & retdec::bin2llvmir::NameContainer::getPreferredNameForAddress ( retdec::common::Address  a)

◆ initFromConfig()

void retdec::bin2llvmir::NameContainer::initFromConfig ( )
private

◆ initFromDebug()

void retdec::bin2llvmir::NameContainer::initFromDebug ( )
private

◆ initFromImage()

void retdec::bin2llvmir::NameContainer::initFromImage ( )
private

◆ loadImportOrds()

bool retdec::bin2llvmir::NameContainer::loadImportOrds ( const std::string &  libName)
private

Member Data Documentation

◆ _config

Config* retdec::bin2llvmir::NameContainer::_config = nullptr
private

◆ _data

std::map<retdec::common::Address, Names> retdec::bin2llvmir::NameContainer::_data
private

◆ _debug

DebugFormat* retdec::bin2llvmir::NameContainer::_debug = nullptr
private

◆ _dllOrds

std::map<std::string, ImportOrdMap> retdec::bin2llvmir::NameContainer::_dllOrds
private

<library name without suffix ".dll", map with ordinals>

◆ _image

FileImage* retdec::bin2llvmir::NameContainer::_image = nullptr
private

◆ _lti

Lti* retdec::bin2llvmir::NameContainer::_lti = nullptr
private

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