retdec
|
Base class for all configs. More...
#include <config.h>
Public Member Functions | |
virtual | ~Config ()=default |
Loading and Saving | |
virtual void | saveTo (const std::string &path)=0 |
Saves the config to the given file. More... | |
Debugging | |
virtual void | dump ()=0 |
Dumps the contents of the config to the standard error. More... | |
Variables | |
virtual bool | isGlobalVarStoringWideString (const std::string &var) const =0 |
Stores the given global variable a wide string? More... | |
virtual std::string | comesFromGlobalVar (const std::string &func, const std::string &var) const =0 |
Returns the name of a global variable from which the given local variable comes from. More... | |
virtual std::string | getRegisterForGlobalVar (const std::string &var) const =0 |
Returns the name of the register corresponding to the given global variable. More... | |
virtual Address | getAddressForGlobalVar (const std::string &var) const =0 |
Returns the address of the given global variable. More... | |
virtual std::string | getDetectedCryptoPatternForGlobalVar (const std::string &var) const =0 |
Returns a description of the detected cryptographic pattern for the given global variable. More... | |
Functions | |
virtual std::string | getRealNameForFunc (const std::string &func) const =0 |
Returns the real name of the given function. More... | |
virtual AddressRange | getAddressRangeForFunc (const std::string &func) const =0 |
Returns the address range of the given function. More... | |
virtual LineRange | getLineRangeForFunc (const std::string &func) const =0 |
Returns the line range of the given function. More... | |
virtual bool | isDecompilerDefinedFunc (const std::string &func) const =0 |
Is the given function decompiler-defined? More... | |
virtual bool | isUserDefinedFunc (const std::string &func) const =0 |
Is the given function user-defined? More... | |
virtual bool | isStaticallyLinkedFunc (const std::string &func) const =0 |
Is the given function statically linked? More... | |
virtual bool | isDynamicallyLinkedFunc (const std::string &func) const =0 |
Is the given function dynamically linked? More... | |
virtual bool | isSyscallFunc (const std::string &func) const =0 |
Is the given function, in fact, a system call? More... | |
virtual bool | isInstructionIdiomFunc (const std::string &func) const =0 |
Did the given function, in fact, come from an instruction idiom? More... | |
virtual bool | isExportedFunc (const std::string &func) const =0 |
Is the given function exported? More... | |
virtual void | markFuncAsStaticallyLinked (const std::string &func)=0 |
Marks the given function as statically linked. More... | |
virtual std::string | getDeclarationStringForFunc (const std::string &func) const =0 |
Returns a C declaration string for the given function. More... | |
virtual std::string | getCommentForFunc (const std::string &func) const =0 |
Returns a comment for the given functions. More... | |
virtual StringSet | getDetectedCryptoPatternsForFunc (const std::string &func) const =0 |
Returns a set of names of detected cryptographic patterns that the given function uses. More... | |
virtual std::string | getWrappedFunc (const std::string &func) const =0 |
Returns the name of a function that func wraps. More... | |
virtual std::string | getDemangledNameOfFunc (const std::string &func) const =0 |
Returns the demangled named of the given function. More... | |
Classes | |
virtual StringSet | getClassNames () const =0 |
Returns the set of found class names. More... | |
virtual std::string | getClassForFunc (const std::string &func) const =0 |
Returns the name of a class to which the given function belongs. More... | |
virtual std::string | getTypeOfFuncInClass (const std::string &func, const std::string &cl) const =0 |
Returns the type of the given function in the given class. More... | |
virtual StringVector | getBaseClassNames (const std::string &cl) const =0 |
Returns the names of base classes of the given class. More... | |
virtual std::string | getDemangledNameOfClass (const std::string &cl) const =0 |
Returns the demangled named of the given class. More... | |
Debug Info | |
virtual bool | isDebugInfoAvailable () const =0 |
Is Debug info available? More... | |
virtual std::string | getDebugModuleNameForFunc (const std::string &func) const =0 |
Returns the name of a module from which the given function originates. More... | |
virtual StringSet | getDebugModuleNames () const =0 |
Returns a set of module names from which functions originate. More... | |
virtual std::string | getDebugNameForGlobalVar (const std::string &var) const =0 |
Returns a name from debug information of the given global variable. More... | |
virtual std::string | getDebugNameForLocalVar (const std::string &func, const std::string &var) const =0 |
Returns a name from debug information of the given local variable from the given function. More... | |
Meta Information | |
virtual std::size_t | getNumberOfFuncsDetectedInFrontend () const =0 |
Returns the number of functions detected in the front-end. More... | |
virtual std::string | getDetectedCompilerOrPacker () const =0 |
Returns the detected compiler or packer. More... | |
virtual std::string | getDetectedLanguage () const =0 |
Returns the detected language. More... | |
virtual StringSet | getSelectedButNotFoundFuncs () const =0 |
Returns a set of functions that were selected to be decompiled but were not found. More... | |
Additional Inherited Members | |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable ()=default | |
~NonCopyable ()=default | |
Base class for all configs.
|
virtualdefault |
|
pure virtual |
Returns the name of a global variable from which the given local variable comes from.
If the given variable does not come from a global variable, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Dumps the contents of the config to the standard error.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the address of the given global variable.
If the given variable is not a global variable or it does not have any address attached, the undefined address is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the address range of the given function.
If the given function does not have an address range, NO_ADDRESS_RANGE
is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the names of base classes of the given class.
If there is no such class, the empty vector is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the name of a class to which the given function belongs.
If func does not belong to any class, the empty string is returned. If func belongs to multiple classes, the name of the first class is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the set of found class names.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a comment for the given functions.
If the given function does not have a comment or it is empty, the empty string is returned.
Line breaks inside the comment are unified to LF.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the name of a module from which the given function originates.
When debug info is not available, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a set of module names from which functions originate.
When debug info is not available, the empty set is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a name from debug information of the given global variable.
If the variable has no such name attached, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a name from debug information of the given local variable from the given function.
If the variable has no such name attached, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a C declaration string for the given function.
If the function does not exist or does not have any C declaration string attached, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the demangled named of the given class.
If there is no such class or its name cannot be demangled, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the demangled named of the given function.
If there is no such function or its name cannot be demangled, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the detected compiler or packer.
Returns the empty string if there is no compiler or packer.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a description of the detected cryptographic pattern for the given global variable.
If the given variable is not a global variable or it does not have any cryptographic-pattern description attached, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a set of names of detected cryptographic patterns that the given function uses.
If the given function does not exist or does not use any cryptographic patterns, the empty set is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the detected language.
Returns the empty string if there is no language.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the line range of the given function.
If the given function does not have a line range, NO_LINE_RANGE
is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the number of functions detected in the front-end.
Returns 0
if there are no detected functions.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the real name of the given function.
If the given function does not have a real name, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the name of the register corresponding to the given global variable.
If the given variable is not a global variable or it does not have any register name attached, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns a set of functions that were selected to be decompiled but were not found.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the type of the given function in the given class.
The returned value is a textual representation, e.g. "constructor" or "virtual member function".
If func does not belong to any class, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Returns the name of a function that func wraps.
A function A
wraps another function B
when the only thing A
does is that it calls B
(with an optional prologue/epilogue).
If func does not exist or it is not a wrapper, the empty string is returned.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Is Debug info available?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Is the given function decompiler-defined?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Is the given function dynamically linked?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Is the given function exported?
A function is exported if it is marked as such in the input binary file (e.g. a DLL exports its functions).
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Stores the given global variable a wide string?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Did the given function, in fact, come from an instruction idiom?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Is the given function statically linked?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Is the given function, in fact, a system call?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Is the given function user-defined?
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Marks the given function as statically linked.
If there is no such function, nothing is done.
Implemented in retdec::llvmir2hll::JSONConfig.
|
pure virtual |
Saves the config to the given file.
Implemented in retdec::llvmir2hll::JSONConfig.