retdec
|
API call finder which searches only in a basic block. More...
#include <basic_block_api_call_seq_finder.h>
Public Member Functions | |
BasicBlockAPICallSeqFinder (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio) | |
Constructs a BasicBlockAPICallSeqFinder object. More... | |
virtual Patterns | findPatterns (const APICallInfoSeq &info, ShPtr< CallExpr > call, ShPtr< Statement > stmt, ShPtr< Function > func, ShPtr< Module > module) override |
Tries to find the given sequence of API calls, starting at stmt. More... | |
![]() | |
virtual | ~APICallSeqFinder ()=default |
Static Public Member Functions | |
static ShPtr< BasicBlockAPICallSeqFinder > | create (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio) |
Additional Inherited Members | |
![]() | |
using | Patterns = std::vector< ShPtr< Pattern > > |
List of patterns. More... | |
![]() | |
APICallSeqFinder (ShPtr< ValueAnalysis > va, ShPtr< CallInfoObtainer > cio) | |
Constructs the base class. More... | |
![]() | |
ShPtr< ValueAnalysis > | va |
Analysis of values. More... | |
ShPtr< CallInfoObtainer > | cio |
The used call info obtainer. More... | |
API call finder which searches only in a basic block.
This finder searches only within the same basic block in which the first statement of a possible pattern appears. For example, consider the following code
and suppose that the pattern is
Then, the present finder does not recognize this pattern because in the code, it spans over multiple basic blocks.
Instances of this class have reference object semantics. Use create() to create instances.
retdec::llvmir2hll::BasicBlockAPICallSeqFinder::BasicBlockAPICallSeqFinder | ( | ShPtr< ValueAnalysis > | va, |
ShPtr< CallInfoObtainer > | cio | ||
) |
Constructs a BasicBlockAPICallSeqFinder object.
[in] | va | The used analysis of values. |
[in] | cio | The used call info obtainer. |
|
static |
|
overridevirtual |
Tries to find the given sequence of API calls, starting at stmt.
[in] | info | A description of an API call sequence. |
[in] | call | A function call. |
[in] | stmt | The statement in which call appears. |
[in] | func | The function in which stmt appears. |
[in] | module | The module in which func appears. |
The used way of finding the pattern depends on concrete finders.
Implements retdec::llvmir2hll::APICallSeqFinder.