ROSE  0.11.87.0
ModulesMips.h
1 #ifndef ROSE_BinaryAnalysis_Partitioner2_ModulesMips_H
2 #define ROSE_BinaryAnalysis_Partitioner2_ModulesMips_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/Partitioner2/Modules.h>
7 
8 namespace Rose {
9 namespace BinaryAnalysis {
10 namespace Partitioner2 {
11 
13 namespace ModulesMips {
14 
17 protected:
18  Function::Ptr function_;
19 public:
21  static Ptr instance() { return Ptr(new MatchRetAddiu); }
22  virtual std::vector<Function::Ptr> functions() const override {
23  return std::vector<Function::Ptr>(1, function_);
24  }
25  virtual bool match(const Partitioner&, rose_addr_t anchor) override;
26 };
27 
28 } // namespace
29 } // namespace
30 } // namespace
31 } // namespace
32 
33 #endif
34 #endif
Base class for matching function prologues.
Definition: Modules.h:111
virtual std::vector< Function::Ptr > functions() const override
Returns the function(s) for the previous successful match.
Definition: ModulesMips.h:22
Main namespace for the ROSE library.
Matches a MIPS function prologue that's a return followed by ADDIU instruction.
Definition: ModulesMips.h:16
virtual bool match(const Partitioner &, rose_addr_t anchor) override
Attempt to match an instruction pattern.
Sawyer::SharedPointer< FunctionPrologueMatcher > Ptr
Shared-ownership pointer to a FunctionPrologueMatcher.
Definition: Modules.h:114
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:289