7 #ifndef RETDEC_LLVMIR2HLL_CONFIG_CONFIG_H
8 #define RETDEC_LLVMIR2HLL_CONFIG_CONFIG_H
28 virtual const char *
what()
const noexcept
override;
30 const std::string &
getMessage()
const noexcept;
49 virtual void saveTo(
const std::string &path) = 0;
79 const std::string &var)
const = 0;
255 const std::string &cl)
const = 0;
312 const std::string &var)
const = 0;
Base class for all config-related errors.
Definition: config.h:24
const std::string & getMessage() const noexcept
Definition: config.cpp:22
virtual const char * what() const noexcept override
Definition: config.cpp:18
std::string message
Definition: config.h:33
ConfigError(const std::string &message)
Constructs the exception with the given error message.
Definition: config.cpp:15
Base class for all configs.
Definition: config.h:39
virtual void saveTo(const std::string &path)=0
Saves the config to the given file.
virtual StringSet getDebugModuleNames() const =0
Returns a set of module names from which functions originate.
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.
virtual std::string getDebugModuleNameForFunc(const std::string &func) const =0
Returns the name of a module from which the given function originates.
virtual LineRange getLineRangeForFunc(const std::string &func) const =0
Returns the line range of the given function.
virtual std::string getDemangledNameOfFunc(const std::string &func) const =0
Returns the demangled named of the given function.
virtual StringVector getBaseClassNames(const std::string &cl) const =0
Returns the names of base classes of the given class.
virtual std::size_t getNumberOfFuncsDetectedInFrontend() const =0
Returns the number of functions detected in the front-end.
virtual std::string getDetectedCompilerOrPacker() const =0
Returns the detected compiler or packer.
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.
virtual bool isSyscallFunc(const std::string &func) const =0
Is the given function, in fact, a system call?
virtual StringSet getSelectedButNotFoundFuncs() const =0
Returns a set of functions that were selected to be decompiled but were not found.
virtual bool isStaticallyLinkedFunc(const std::string &func) const =0
Is the given function statically linked?
virtual std::string getRegisterForGlobalVar(const std::string &var) const =0
Returns the name of the register corresponding to the given global variable.
virtual StringSet getClassNames() const =0
Returns the set of found class names.
virtual std::string getRealNameForFunc(const std::string &func) const =0
Returns the real name of the given function.
virtual void markFuncAsStaticallyLinked(const std::string &func)=0
Marks the given function as statically linked.
virtual ~Config()=default
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.
virtual std::string getDemangledNameOfClass(const std::string &cl) const =0
Returns the demangled named of the given class.
virtual std::string getCommentForFunc(const std::string &func) const =0
Returns a comment for the given functions.
virtual bool isUserDefinedFunc(const std::string &func) const =0
Is the given function user-defined?
virtual AddressRange getAddressRangeForFunc(const std::string &func) const =0
Returns the address range of the given function.
virtual bool isDynamicallyLinkedFunc(const std::string &func) const =0
Is the given function dynamically linked?
virtual void dump()=0
Dumps the contents of the config to the standard error.
virtual bool isInstructionIdiomFunc(const std::string &func) const =0
Did the given function, in fact, come from an instruction idiom?
virtual bool isGlobalVarStoringWideString(const std::string &var) const =0
Stores the given global variable a wide string?
virtual std::string getDetectedCryptoPatternForGlobalVar(const std::string &var) const =0
Returns a description of the detected cryptographic pattern for the given global variable.
virtual bool isDebugInfoAvailable() const =0
Is Debug info available?
virtual std::string getWrappedFunc(const std::string &func) const =0
Returns the name of a function that func wraps.
virtual StringSet getDetectedCryptoPatternsForFunc(const std::string &func) const =0
Returns a set of names of detected cryptographic patterns that the given function uses.
virtual bool isExportedFunc(const std::string &func) const =0
Is the given function exported?
virtual std::string getDetectedLanguage() const =0
Returns the detected language.
virtual std::string getDebugNameForGlobalVar(const std::string &var) const =0
Returns a name from debug information of the given global variable.
virtual std::string getDeclarationStringForFunc(const std::string &func) const =0
Returns a C declaration string for the given function.
virtual std::string getClassForFunc(const std::string &func) const =0
Returns the name of a class to which the given function belongs.
virtual bool isDecompilerDefinedFunc(const std::string &func) const =0
Is the given function decompiler-defined?
virtual Address getAddressForGlobalVar(const std::string &var) const =0
Returns the address of the given global variable.
A mixin to make classes non-copyable.
Definition: non_copyable.h:27
A library providing API for working with back-end IR.
std::vector< std::string > StringVector
Vector of strings.
Definition: types.h:87
std::set< std::string > StringSet
Set of strings.
Definition: types.h:51
std::pair< std::uint64_t, std::uint64_t > LineRange
Line range.
Definition: types.h:45
Definition: archive_wrapper.h:19
A mixin to make classes non-copyable.
Aliases for several useful types.