retdec
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
retdec::llvmir2hll::APICallSeqFinder Class Referenceabstract

A base class for all API calls finders. More...

#include <api_call_seq_finder.h>

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

Public Types

using Patterns = std::vector< ShPtr< Pattern > >
 List of patterns. More...
 

Public Member Functions

virtual ~APICallSeqFinder ()=default
 
virtual Patterns findPatterns (const APICallInfoSeq &info, ShPtr< CallExpr > call, ShPtr< Statement > stmt, ShPtr< Function > func, ShPtr< Module > module)=0
 Tries to find the given sequence of API calls, starting at stmt. More...
 

Protected Member Functions

 APICallSeqFinder (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio)
 Constructs the base class. More...
 

Protected Attributes

ShPtr< ValueAnalysisva
 Analysis of values. More...
 
ShPtr< CallInfoObtainercio
 The used call info obtainer. More...
 

Additional Inherited Members

- Private Member Functions inherited from retdec::utils::NonCopyable
 NonCopyable (const NonCopyable &)=delete
 
NonCopyableoperator= (const NonCopyable &)=delete
 
 NonCopyable ()=default
 
 ~NonCopyable ()=default
 

Detailed Description

A base class for all API calls finders.

Concrete API calls finders should inherit from this class.

Instances of this class have reference object semantics.

Member Typedef Documentation

◆ Patterns

List of patterns.

Constructor & Destructor Documentation

◆ ~APICallSeqFinder()

virtual retdec::llvmir2hll::APICallSeqFinder::~APICallSeqFinder ( )
virtualdefault

◆ APICallSeqFinder()

retdec::llvmir2hll::APICallSeqFinder::APICallSeqFinder ( ShPtr< ValueAnalysis va,
ShPtr< CallInfoObtainer cio 
)
protected

Constructs the base class.

Parameters
[in]vaThe used analysis of values.
[in]cioThe used call info obtainer.
Preconditions
  • va and cio are non-null
  • va is in a valid state
  • cio has been initialized

Member Function Documentation

◆ findPatterns()

virtual Patterns retdec::llvmir2hll::APICallSeqFinder::findPatterns ( const APICallInfoSeq info,
ShPtr< CallExpr call,
ShPtr< Statement stmt,
ShPtr< Function func,
ShPtr< Module module 
)
pure virtual

Tries to find the given sequence of API calls, starting at stmt.

Parameters
[in]infoA description of an API call sequence.
[in]callA function call.
[in]stmtThe statement in which call appears.
[in]funcThe function in which stmt appears.
[in]moduleThe module in which func appears.

The used way of finding the pattern depends on concrete finders.

Preconditions
  • call, stmt, func, and module are non-null

Implemented in retdec::llvmir2hll::BasicBlockAPICallSeqFinder.

Member Data Documentation

◆ cio

ShPtr<CallInfoObtainer> retdec::llvmir2hll::APICallSeqFinder::cio
protected

The used call info obtainer.

◆ va

ShPtr<ValueAnalysis> retdec::llvmir2hll::APICallSeqFinder::va
protected

Analysis of values.


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