retdec
|
Semantics for Windows API. More...
#include <win_api_semantics.h>
Public Member Functions | |
Semantics Interface | |
virtual std::string | getId () const override |
Returns the ID of the semantics. More... | |
virtual std::optional< std::string > | getCHeaderFileForFunc (const std::string &funcName) const override |
Returns the C header file for the given function. More... | |
virtual std::optional< bool > | funcNeverReturns (const std::string &funcName) const override |
Gets the information whether the given function never returns. More... | |
virtual std::optional< std::string > | getNameOfVarStoringResult (const std::string &funcName) const override |
Returns an appropriate name of the variable that stores the result of calls to the given function. More... | |
virtual std::optional< std::string > | getNameOfParam (const std::string &funcName, unsigned paramPos) const override |
Returns an appropriate name of the given function's parameter. More... | |
virtual std::optional< IntStringMap > | getSymbolicNamesForParam (const std::string &funcName, unsigned paramPos) const override |
Returns a mapping of integers into their symbolic names for the given parameter of the given function. More... | |
![]() | |
virtual std::optional< std::string > | getMainFuncName () const override |
Returns the name of the main function. More... | |
![]() | |
virtual | ~Semantics ()=default |
Static Public Member Functions | |
static ShPtr< Semantics > | create () |
Creates a new semantics. More... | |
![]() | |
static ShPtr< Semantics > | create () |
Creates a new semantics. More... | |
Protected Member Functions | |
WinAPISemantics () | |
Constructs the semantics. More... | |
![]() | |
DefaultSemantics () | |
Constructs the semantics. More... | |
![]() | |
Semantics ()=default | |
Semantics for Windows API.
This class provides the semantics for Windows API.
Instances of this class have reference object semantics.
|
protected |
Constructs the semantics.
|
overridevirtual |
Gets the information whether the given function never returns.
true
if the given function never returns, false
if the function may return, and std::nullopt
otherwise.[in] | funcName | Name of the function. |
For example, semantics describing the standard C library may return true
for "exit"
.
Reimplemented from retdec::llvmir2hll::DefaultSemantics.
|
overridevirtual |
Returns the C header file for the given function.
"file"
if the header file is known, std::nullopt
otherwise.[in] | funcName | Name of the function. |
For example, semantics describing the standard C library may return "stdio.h"
for "printf"
.
Reimplemented from retdec::llvmir2hll::DefaultSemantics.
|
overridevirtual |
Returns the ID of the semantics.
Reimplemented from retdec::llvmir2hll::DefaultSemantics.
|
overridevirtual |
Returns an appropriate name of the given function's parameter.
"name"
if the name is known, std::nullopt
otherwise.[in] | funcName | Name of the function. |
[in] | paramPos | Position of the parameter. |
For example, semantics describing the standard C library may return "file_path"
for the first parameter of "fopen"
.
Reimplemented from retdec::llvmir2hll::DefaultSemantics.
|
overridevirtual |
Returns an appropriate name of the variable that stores the result of calls to the given function.
"name"
if the name is known, std::nullopt
otherwise.[in] | funcName | Name of the function. |
For example, semantics describing the standard C library may return "c"
for "getchar"
.
Reimplemented from retdec::llvmir2hll::DefaultSemantics.
|
overridevirtual |
Returns a mapping of integers into their symbolic names for the given parameter of the given function.
map
if the mapping is known, std::nullopt
otherwise.[in] | funcName | Name of the function. |
[in] | paramPos | Position of the parameter. |
For example, a semantics may return
for "flock"
and 2
.
Reimplemented from retdec::llvmir2hll::DefaultSemantics.