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