retdec
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
retdec::llvmir2hll::APICallPatternFinder Class Reference

Finds interesting API calls in a module. More...

#include <api_call_pattern_finder.h>

Inheritance diagram for retdec::llvmir2hll::APICallPatternFinder:
Inheritance graph
[legend]
Collaboration diagram for retdec::llvmir2hll::APICallPatternFinder:
Collaboration graph
[legend]

Public Member Functions

virtual const std::string getId () const override
 Returns the ID of the finder. More...
 
virtual Patterns findPatterns (ShPtr< Module > module) override
 Finds patterns in the given module and returns them. More...
 
- Public Member Functions inherited from retdec::llvmir2hll::PatternFinder
virtual ~PatternFinder ()=default
 

Static Public Member Functions

static ShPtr< PatternFindercreate (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio)
 Creates and returns a new instance of APICallPatternFinder. More...
 

Private Member Functions

 APICallPatternFinder (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio)
 Constructs a pattern finder. More...
 

Additional Inherited Members

- Public Types inherited from retdec::llvmir2hll::PatternFinder
using Patterns = std::vector< ShPtr< Pattern > >
 A list of patterns. More...
 
- Protected Member Functions inherited from retdec::llvmir2hll::PatternFinder
 PatternFinder (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio)
 Constructs a pattern finder. More...
 
- Protected Attributes inherited from retdec::llvmir2hll::PatternFinder
ShPtr< ValueAnalysisva
 Analysis of values. More...
 
ShPtr< CallInfoObtainercio
 The used call info obtainer. More...
 

Detailed Description

Finds interesting API calls in a module.

This finder finds calls in a module that are considered interesting. For a list of such calls, see the implementation of getAPICallFuncNames() in the .cpp file.

TODO Include only calls to declared functions, or also to defined ones? For example, if there is a ShellExecute() function defined in the module, should we also include calls to it even though it may have different behavior than ShellExecute() from WinAPI?

TODO Move the names of interesting functions into semantics?

Instances of this class have reference object semantics. Use create() to create instances.

Constructor & Destructor Documentation

◆ APICallPatternFinder()

retdec::llvmir2hll::APICallPatternFinder::APICallPatternFinder ( ShPtr< ValueAnalysis va,
ShPtr< CallInfoObtainer cio 
)
private

Constructs a pattern finder.

See PatternFinder::PatternFinder() for more information.

Member Function Documentation

◆ create()

ShPtr< PatternFinder > retdec::llvmir2hll::APICallPatternFinder::create ( ShPtr< ValueAnalysis va,
ShPtr< CallInfoObtainer cio 
)
static

Creates and returns a new instance of APICallPatternFinder.

See PatternFinder::PatternFinder() for more information on the parameters and preconditions.

◆ findPatterns()

PatternFinder::Patterns retdec::llvmir2hll::APICallPatternFinder::findPatterns ( ShPtr< Module module)
overridevirtual

Finds patterns in the given module and returns them.

The returned patterns are instances of StmtsPattern.

Implements retdec::llvmir2hll::PatternFinder.

◆ getId()

const std::string retdec::llvmir2hll::APICallPatternFinder::getId ( ) const
overridevirtual

Returns the ID of the finder.

Implements retdec::llvmir2hll::PatternFinder.


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