retdec
Public Member Functions | Public Attributes | Private Attributes | List of all members
retdec::config::Parameters Class Reference

#include <parameters.h>

Collaboration diagram for retdec::config::Parameters:
Collaboration graph
[legend]

Public Member Functions

void fixRelativePaths (const std::string &configPath)
 
template<typename Writer >
void serialize (Writer &writer) const
 
void deserialize (const rapidjson::Value &val)
 
Parameters query methods.
bool isSomethingSelected () const
 
bool isVerboseOutput () const
 
bool isKeepAllFunctions () const
 
bool isSelectedDecodeOnly () const
 
bool isDetectStaticCode () const
 
bool isTimeout () const
 
bool isMaxMemoryLimitHalfRam () const
 
bool isBackendNoOpts () const
 
bool isBackendEmitCfg () const
 
bool isBackendEmitCg () const
 
bool isBackendAggressiveOpts () const
 
bool isBackendKeepAllBrackets () const
 
bool isBackendKeepLibraryFuncs () const
 
bool isBackendNoTimeVaryingInfo () const
 
bool isBackendNoVarRenaming () const
 
bool isBackendNoCompoundOperators () const
 
bool isBackendNoSymbolicNames () const
 
Parameters set methods.
void setIsVerboseOutput (bool b)
 
void setIsKeepAllFunctions (bool b)
 
void setIsSelectedDecodeOnly (bool b)
 
void setOrdinalNumbersDirectory (const std::string &n)
 
void setInputFile (const std::string &file)
 
void setInputPdbFile (const std::string &file)
 
void setOutputFile (const std::string &n)
 
void setOutputBitcodeFile (const std::string &file)
 
void setOutputAsmFile (const std::string &file)
 
void setOutputLlvmirFile (const std::string &file)
 
void setOutputConfigFile (const std::string &file)
 
void setOutputUnpackedFile (const std::string &file)
 
void setOutputFormat (const std::string &format)
 
void setLogFile (const std::string &file)
 
void setErrFile (const std::string &file)
 
void setMaxMemoryLimit (uint64_t limit)
 
void setIsMaxMemoryLimitHalfRam (bool f)
 
void setTimeout (uint64_t seconds)
 
void setEntryPoint (const retdec::common::Address &a)
 
void setMainAddress (const retdec::common::Address &a)
 
void setSectionVMA (const retdec::common::Address &a)
 
void setBackendDisabledOpts (const std::string &o)
 
void setBackendEnabledOpts (const std::string &o)
 
void setBackendCallInfoObtainer (const std::string &val)
 
void setBackendVarRenamer (const std::string &val)
 
void setIsDetectStaticCode (bool b)
 
void setIsBackendNoOpts (bool b)
 
void setIsBackendEmitCfg (bool b)
 
void setIsBackendEmitCg (bool b)
 
void setIsBackendAggressiveOpts (bool b)
 
void setIsBackendKeepAllBrackets (bool b)
 
void setIsBackendKeepLibraryFuncs (bool b)
 
void setIsBackendNoTimeVaryingInfo (bool b)
 
void setIsBackendNoVarRenaming (bool b)
 
void setIsBackendNoCompoundOperators (bool b)
 
void setIsBackendNoSymbolicNames (bool b)
 
Parameters get methods.
const std::string & getOrdinalNumbersDirectory () const
 
const std::string & getInputFile () const
 
const std::string & getInputPdbFile () const
 
const std::string & getOutputFile () const
 
const std::string & getOutputBitcodeFile () const
 
const std::string & getOutputAsmFile () const
 
const std::string & getOutputLlvmirFile () const
 
const std::string & getOutputConfigFile () const
 
const std::string & getOutputUnpackedFile () const
 
const std::string & getOutputFormat () const
 
const std::string & getLogFile () const
 
const std::string & getErrFile () const
 
uint64_t getMaxMemoryLimit () const
 
uint64_t getTimeout () const
 
retdec::common::Address getEntryPoint () const
 
retdec::common::Address getMainAddress () const
 
retdec::common::Address getSectionVMA () const
 
const std::string & getBackendDisabledOpts () const
 
const std::string & getBackendEnabledOpts () const
 
const std::string & getBackendCallInfoObtainer () const
 
const std::string & getBackendVarRenamer () const
 

Public Attributes

std::set< std::string > userStaticSignaturePaths
 
std::set< std::string > staticSignaturePaths
 
std::set< std::string > libraryTypeInfoPaths
 
std::set< std::string > cryptoPatternPaths
 
std::set< std::string > abiPaths
 
std::set< std::string > selectedFunctions
 
std::set< std::string > selectedNotFoundFunctions
 
common::AddressRangeContainer selectedRanges
 Address ranges selected by the user through selective decompilation. More...
 
std::vector< std::string > llvmPasses
 LLVM passes. More...
 

Private Attributes

bool _verboseOutput = true
 
bool _keepAllFunctions = false
 
bool _selectedDecodeOnly = false
 
std::string _ordinalNumbersDirectory
 
std::string _inputFile
 
std::string _inputPdbFile
 
std::string _outputFile
 
std::string _outputBitcodeFile
 
std::string _outputAsmFile
 
std::string _outputLlFile
 
std::string _outputConfigFile
 
std::string _outputUnpackedFile
 
std::string _outputFormat
 
std::string _logFile
 
std::string _errFile
 
uint64_t _maxMemoryLimit = 0
 
bool _maxMemoryLimitHalfRam = true
 
uint64_t _timeout = 0
 
bool _detectStaticCode = true
 
std::string _backendDisabledOpts
 
std::string _backendEnabledOpts
 
std::string _backendCallInfoObtainer = "optim"
 
std::string _backendVarRenamer = "readable"
 
bool _backendNoOpts = false
 
bool _backendEmitCfg = false
 
bool _backendEmitCg = false
 
bool _backendAggressiveOpts = false
 
bool _backendKeepAllBrackets = false
 
bool _backendKeepLibraryFuncs = false
 
bool _backendNoTimeVaryingInfo = false
 
bool _backendNoVarRenaming = false
 
bool _backendNoCompoundOperators = false
 
bool _backendNoSymbolicNames = false
 
retdec::common::Address _entryPoint
 
retdec::common::Address _mainAddress
 
retdec::common::Address _sectionVMA
 

Detailed Description

Represents decompilation process parameters (options).

Member Function Documentation

◆ deserialize()

void retdec::config::Parameters::deserialize ( const rapidjson::Value &  val)

Reads JSON object (associative array) holding parameters information.

Parameters
valJSON object.

◆ fixRelativePaths()

void retdec::config::Parameters::fixRelativePaths ( const std::string &  configPath)

◆ getBackendCallInfoObtainer()

const std::string & retdec::config::Parameters::getBackendCallInfoObtainer ( ) const

◆ getBackendDisabledOpts()

const std::string & retdec::config::Parameters::getBackendDisabledOpts ( ) const

◆ getBackendEnabledOpts()

const std::string & retdec::config::Parameters::getBackendEnabledOpts ( ) const

◆ getBackendVarRenamer()

const std::string & retdec::config::Parameters::getBackendVarRenamer ( ) const

◆ getEntryPoint()

retdec::common::Address retdec::config::Parameters::getEntryPoint ( ) const

◆ getErrFile()

const std::string & retdec::config::Parameters::getErrFile ( ) const

◆ getInputFile()

const std::string & retdec::config::Parameters::getInputFile ( ) const

◆ getInputPdbFile()

const std::string & retdec::config::Parameters::getInputPdbFile ( ) const

◆ getLogFile()

const std::string & retdec::config::Parameters::getLogFile ( ) const

◆ getMainAddress()

retdec::common::Address retdec::config::Parameters::getMainAddress ( ) const

◆ getMaxMemoryLimit()

uint64_t retdec::config::Parameters::getMaxMemoryLimit ( ) const

◆ getOrdinalNumbersDirectory()

const std::string & retdec::config::Parameters::getOrdinalNumbersDirectory ( ) const

◆ getOutputAsmFile()

const std::string & retdec::config::Parameters::getOutputAsmFile ( ) const

◆ getOutputBitcodeFile()

const std::string & retdec::config::Parameters::getOutputBitcodeFile ( ) const

◆ getOutputConfigFile()

const std::string & retdec::config::Parameters::getOutputConfigFile ( ) const

◆ getOutputFile()

const std::string & retdec::config::Parameters::getOutputFile ( ) const

◆ getOutputFormat()

const std::string & retdec::config::Parameters::getOutputFormat ( ) const

◆ getOutputLlvmirFile()

const std::string & retdec::config::Parameters::getOutputLlvmirFile ( ) const

◆ getOutputUnpackedFile()

const std::string & retdec::config::Parameters::getOutputUnpackedFile ( ) const

◆ getSectionVMA()

retdec::common::Address retdec::config::Parameters::getSectionVMA ( ) const

◆ getTimeout()

uint64_t retdec::config::Parameters::getTimeout ( ) const

◆ isBackendAggressiveOpts()

bool retdec::config::Parameters::isBackendAggressiveOpts ( ) const

◆ isBackendEmitCfg()

bool retdec::config::Parameters::isBackendEmitCfg ( ) const

◆ isBackendEmitCg()

bool retdec::config::Parameters::isBackendEmitCg ( ) const

◆ isBackendKeepAllBrackets()

bool retdec::config::Parameters::isBackendKeepAllBrackets ( ) const

◆ isBackendKeepLibraryFuncs()

bool retdec::config::Parameters::isBackendKeepLibraryFuncs ( ) const

◆ isBackendNoCompoundOperators()

bool retdec::config::Parameters::isBackendNoCompoundOperators ( ) const

◆ isBackendNoOpts()

bool retdec::config::Parameters::isBackendNoOpts ( ) const

◆ isBackendNoSymbolicNames()

bool retdec::config::Parameters::isBackendNoSymbolicNames ( ) const

◆ isBackendNoTimeVaryingInfo()

bool retdec::config::Parameters::isBackendNoTimeVaryingInfo ( ) const

◆ isBackendNoVarRenaming()

bool retdec::config::Parameters::isBackendNoVarRenaming ( ) const

◆ isDetectStaticCode()

bool retdec::config::Parameters::isDetectStaticCode ( ) const

◆ isKeepAllFunctions()

bool retdec::config::Parameters::isKeepAllFunctions ( ) const
Returns
Keep all functions in the decompiler's output. Otherwise, only functions reachable from main are kept.

◆ isMaxMemoryLimitHalfRam()

bool retdec::config::Parameters::isMaxMemoryLimitHalfRam ( ) const

◆ isSelectedDecodeOnly()

bool retdec::config::Parameters::isSelectedDecodeOnly ( ) const
Returns
Decode only parts selected through selective decompilation. Otherwise, entire binary is decoded. This speeds up decompilation, but usually produces lower-quality results.

◆ isSomethingSelected()

bool retdec::config::Parameters::isSomethingSelected ( ) const

Find out if some functions or ranges were selected in selective decompilation.

Returns
True if selectedFunctions or selectedRanges not empty, false otherwise.

◆ isTimeout()

bool retdec::config::Parameters::isTimeout ( ) const

◆ isVerboseOutput()

bool retdec::config::Parameters::isVerboseOutput ( ) const
Returns
Decompilation will verbosely inform about the decompilation process.

◆ serialize()

template<typename Writer >
template void retdec::config::Parameters::serialize ( Writer &  writer) const

Returns JSON object (associative array) holding parameters information.

Returns
JSON object.

◆ setBackendCallInfoObtainer()

void retdec::config::Parameters::setBackendCallInfoObtainer ( const std::string &  val)

◆ setBackendDisabledOpts()

void retdec::config::Parameters::setBackendDisabledOpts ( const std::string &  o)

◆ setBackendEnabledOpts()

void retdec::config::Parameters::setBackendEnabledOpts ( const std::string &  o)

◆ setBackendVarRenamer()

void retdec::config::Parameters::setBackendVarRenamer ( const std::string &  val)

◆ setEntryPoint()

void retdec::config::Parameters::setEntryPoint ( const retdec::common::Address a)

◆ setErrFile()

void retdec::config::Parameters::setErrFile ( const std::string &  file)

◆ setInputFile()

void retdec::config::Parameters::setInputFile ( const std::string &  file)

◆ setInputPdbFile()

void retdec::config::Parameters::setInputPdbFile ( const std::string &  file)

◆ setIsBackendAggressiveOpts()

void retdec::config::Parameters::setIsBackendAggressiveOpts ( bool  b)

◆ setIsBackendEmitCfg()

void retdec::config::Parameters::setIsBackendEmitCfg ( bool  b)

◆ setIsBackendEmitCg()

void retdec::config::Parameters::setIsBackendEmitCg ( bool  b)

◆ setIsBackendKeepAllBrackets()

void retdec::config::Parameters::setIsBackendKeepAllBrackets ( bool  b)

◆ setIsBackendKeepLibraryFuncs()

void retdec::config::Parameters::setIsBackendKeepLibraryFuncs ( bool  b)

◆ setIsBackendNoCompoundOperators()

void retdec::config::Parameters::setIsBackendNoCompoundOperators ( bool  b)

◆ setIsBackendNoOpts()

void retdec::config::Parameters::setIsBackendNoOpts ( bool  b)

◆ setIsBackendNoSymbolicNames()

void retdec::config::Parameters::setIsBackendNoSymbolicNames ( bool  b)

◆ setIsBackendNoTimeVaryingInfo()

void retdec::config::Parameters::setIsBackendNoTimeVaryingInfo ( bool  b)

◆ setIsBackendNoVarRenaming()

void retdec::config::Parameters::setIsBackendNoVarRenaming ( bool  b)

◆ setIsDetectStaticCode()

void retdec::config::Parameters::setIsDetectStaticCode ( bool  b)

◆ setIsKeepAllFunctions()

void retdec::config::Parameters::setIsKeepAllFunctions ( bool  b)

◆ setIsMaxMemoryLimitHalfRam()

void retdec::config::Parameters::setIsMaxMemoryLimitHalfRam ( bool  f)

◆ setIsSelectedDecodeOnly()

void retdec::config::Parameters::setIsSelectedDecodeOnly ( bool  b)

◆ setIsVerboseOutput()

void retdec::config::Parameters::setIsVerboseOutput ( bool  b)

◆ setLogFile()

void retdec::config::Parameters::setLogFile ( const std::string &  file)

◆ setMainAddress()

void retdec::config::Parameters::setMainAddress ( const retdec::common::Address a)

◆ setMaxMemoryLimit()

void retdec::config::Parameters::setMaxMemoryLimit ( uint64_t  limit)

◆ setOrdinalNumbersDirectory()

void retdec::config::Parameters::setOrdinalNumbersDirectory ( const std::string &  n)

◆ setOutputAsmFile()

void retdec::config::Parameters::setOutputAsmFile ( const std::string &  file)

◆ setOutputBitcodeFile()

void retdec::config::Parameters::setOutputBitcodeFile ( const std::string &  file)

◆ setOutputConfigFile()

void retdec::config::Parameters::setOutputConfigFile ( const std::string &  file)

◆ setOutputFile()

void retdec::config::Parameters::setOutputFile ( const std::string &  n)

◆ setOutputFormat()

void retdec::config::Parameters::setOutputFormat ( const std::string &  format)

◆ setOutputLlvmirFile()

void retdec::config::Parameters::setOutputLlvmirFile ( const std::string &  file)

◆ setOutputUnpackedFile()

void retdec::config::Parameters::setOutputUnpackedFile ( const std::string &  file)

◆ setSectionVMA()

void retdec::config::Parameters::setSectionVMA ( const retdec::common::Address a)

◆ setTimeout()

void retdec::config::Parameters::setTimeout ( uint64_t  seconds)

Member Data Documentation

◆ _backendAggressiveOpts

bool retdec::config::Parameters::_backendAggressiveOpts = false
private

◆ _backendCallInfoObtainer

std::string retdec::config::Parameters::_backendCallInfoObtainer = "optim"
private

◆ _backendDisabledOpts

std::string retdec::config::Parameters::_backendDisabledOpts
private

◆ _backendEmitCfg

bool retdec::config::Parameters::_backendEmitCfg = false
private

◆ _backendEmitCg

bool retdec::config::Parameters::_backendEmitCg = false
private

◆ _backendEnabledOpts

std::string retdec::config::Parameters::_backendEnabledOpts
private

◆ _backendKeepAllBrackets

bool retdec::config::Parameters::_backendKeepAllBrackets = false
private

◆ _backendKeepLibraryFuncs

bool retdec::config::Parameters::_backendKeepLibraryFuncs = false
private

◆ _backendNoCompoundOperators

bool retdec::config::Parameters::_backendNoCompoundOperators = false
private

◆ _backendNoOpts

bool retdec::config::Parameters::_backendNoOpts = false
private

◆ _backendNoSymbolicNames

bool retdec::config::Parameters::_backendNoSymbolicNames = false
private

◆ _backendNoTimeVaryingInfo

bool retdec::config::Parameters::_backendNoTimeVaryingInfo = false
private

◆ _backendNoVarRenaming

bool retdec::config::Parameters::_backendNoVarRenaming = false
private

◆ _backendVarRenamer

std::string retdec::config::Parameters::_backendVarRenamer = "readable"
private

◆ _detectStaticCode

bool retdec::config::Parameters::_detectStaticCode = true
private

◆ _entryPoint

retdec::common::Address retdec::config::Parameters::_entryPoint
private

◆ _errFile

std::string retdec::config::Parameters::_errFile
private

◆ _inputFile

std::string retdec::config::Parameters::_inputFile
private

◆ _inputPdbFile

std::string retdec::config::Parameters::_inputPdbFile
private

◆ _keepAllFunctions

bool retdec::config::Parameters::_keepAllFunctions = false
private

Keep all functions in the decompiler's output. Otherwise, only functions reachable from main are kept.

◆ _logFile

std::string retdec::config::Parameters::_logFile
private

◆ _mainAddress

retdec::common::Address retdec::config::Parameters::_mainAddress
private

◆ _maxMemoryLimit

uint64_t retdec::config::Parameters::_maxMemoryLimit = 0
private

◆ _maxMemoryLimitHalfRam

bool retdec::config::Parameters::_maxMemoryLimitHalfRam = true
private

◆ _ordinalNumbersDirectory

std::string retdec::config::Parameters::_ordinalNumbersDirectory
private

◆ _outputAsmFile

std::string retdec::config::Parameters::_outputAsmFile
private

◆ _outputBitcodeFile

std::string retdec::config::Parameters::_outputBitcodeFile
private

◆ _outputConfigFile

std::string retdec::config::Parameters::_outputConfigFile
private

◆ _outputFile

std::string retdec::config::Parameters::_outputFile
private

◆ _outputFormat

std::string retdec::config::Parameters::_outputFormat
private

◆ _outputLlFile

std::string retdec::config::Parameters::_outputLlFile
private

◆ _outputUnpackedFile

std::string retdec::config::Parameters::_outputUnpackedFile
private

◆ _sectionVMA

retdec::common::Address retdec::config::Parameters::_sectionVMA
private

◆ _selectedDecodeOnly

bool retdec::config::Parameters::_selectedDecodeOnly = false
private

Decode only parts selected through selective decompilation. Otherwise, entire binary is decoded. This speeds up decompilation, but usually produces lower-quality results.

◆ _timeout

uint64_t retdec::config::Parameters::_timeout = 0
private

◆ _verboseOutput

bool retdec::config::Parameters::_verboseOutput = true
private

Decompilation will verbosely inform about the decompilation process.

◆ abiPaths

std::set<std::string> retdec::config::Parameters::abiPaths

◆ cryptoPatternPaths

std::set<std::string> retdec::config::Parameters::cryptoPatternPaths

◆ libraryTypeInfoPaths

std::set<std::string> retdec::config::Parameters::libraryTypeInfoPaths

◆ llvmPasses

std::vector<std::string> retdec::config::Parameters::llvmPasses

LLVM passes.

◆ selectedFunctions

std::set<std::string> retdec::config::Parameters::selectedFunctions

Functions' names which were selected by the user through selective decompilation.

◆ selectedNotFoundFunctions

std::set<std::string> retdec::config::Parameters::selectedNotFoundFunctions

Selected functions' names from selectedFunctions which were not found in the binary.

◆ selectedRanges

common::AddressRangeContainer retdec::config::Parameters::selectedRanges

Address ranges selected by the user through selective decompilation.

◆ staticSignaturePaths

std::set<std::string> retdec::config::Parameters::staticSignaturePaths

◆ userStaticSignaturePaths

std::set<std::string> retdec::config::Parameters::userStaticSignaturePaths

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