retdec
Namespaces | Classes | Functions
retdec Namespace Reference

Namespaces

 ar_extractor
 
 bin2llvmir
 
 capstone2llvmir
 
 common
 
 config
 
 cpdetect
 
 ctypes
 
 ctypesparser
 
 debugformat
 
 demangler
 
 fileformat
 
 fileinfo
 
 llvmir2hll
 
 llvmir_emul
 
 loader
 
 macho_extractor
 
 patterngen
 
 patterngenl
 A library for generating yara pattern files.
 
 pdbparser
 
 rtti_finder
 
 serdes
 
 stacofin
 
 unpacker
 
 unpackertool
 Generic unpacker.
 
 utils
 
 yaracpp
 

Classes

struct  LlvmModuleContextPair
 
class  ModulePassPrinter
 

Functions

LlvmModuleContextPair disassemble (const std::string &inputPath, retdec::common::FunctionSet *fs=nullptr)
 
bool decompile (retdec::config::Config &config, std::string *outString=nullptr)
 
common::BasicBlock fillBasicBlock (bin2llvmir::Config *config, llvm::BasicBlock &bb, llvm::BasicBlock &bbEnd)
 
common::Function fillFunction (bin2llvmir::Config *config, llvm::Function &f)
 
void fillFunctions (llvm::Module &module, retdec::common::FunctionSet *fs)
 
llvm::PassRegistry & initializeLlvmPasses ()
 
static void addPass (legacy::PassManagerBase &PM, Pass *P, const PassInfo *PI)
 
void setLogsFrom (const retdec::config::Parameters &params)
 

Function Documentation

◆ addPass()

static void retdec::addPass ( legacy::PassManagerBase &  PM,
Pass *  P,
const PassInfo *  PI 
)
inlinestatic

Add the pass to the pass manager - no verification.

◆ decompile()

bool retdec::decompile ( retdec::config::Config config,
std::string *  outString = nullptr 
)

Run a decompilation according to a config configuration. If outString is set, decompilation output will be returned in this string. Otherwise, output file is expected to be set in config.

◆ disassemble()

LlvmModuleContextPair retdec::disassemble ( const std::string &  inputPath,
retdec::common::FunctionSet fs = nullptr 
)
Parameters
[in]inputPathPath the the input file to disassemble.
[out]fsSet of functions to fill.
Returns
Pointer to LLVM module created by the disassembly, or nullptr if the disassembly failed.

◆ fillBasicBlock()

common::BasicBlock retdec::fillBasicBlock ( bin2llvmir::Config config,
llvm::BasicBlock &  bb,
llvm::BasicBlock &  bbEnd 
)

◆ fillFunction()

common::Function retdec::fillFunction ( bin2llvmir::Config config,
llvm::Function &  f 
)

◆ fillFunctions()

void retdec::fillFunctions ( llvm::Module &  module,
retdec::common::FunctionSet fs 
)

◆ initializeLlvmPasses()

llvm::PassRegistry& retdec::initializeLlvmPasses ( )

Call a bunch of LLVM initialization functions, same as the original opt.

◆ setLogsFrom()

void retdec::setLogsFrom ( const retdec::config::Parameters params)

TODO: this function has exact copy located in retdec-decompiler.cpp. The reason for this is that right now creation of correct interface that would hold this function is much more time expensive than hard copy.

Before merging these two methods (providing them suitable interface) each change in one of them must be reflected to both.