ROSE  0.11.2.0
ModulesM68k.h
1 #ifndef ROSE_Partitioner2_ModulesM68k_H
2 #define ROSE_Partitioner2_ModulesM68k_H
3 
4 #include <rosePublicConfig.h>
5 #ifdef ROSE_BUILD_BINARY_ANALYSIS_SUPPORT
6 
7 #include <Partitioner2/Function.h>
8 #include <Partitioner2/Partitioner.h>
9 
10 namespace Rose {
11 namespace BinaryAnalysis {
12 namespace Partitioner2 {
13 
15 namespace ModulesM68k {
16 
21 protected:
22  Function::Ptr function_;
23 public:
25  static Ptr instance() { return Ptr(new MatchLink); }
26  virtual std::vector<Function::Ptr> functions() const ROSE_OVERRIDE { return std::vector<Function::Ptr>(1, function_); }
27  virtual bool match(const Partitioner&, rose_addr_t anchor) ROSE_OVERRIDE;
28 };
29 
32 public:
34  static Ptr instance() { return Ptr(new MatchFunctionPadding); }
35  virtual rose_addr_t match(const Partitioner&, rose_addr_t anchor) ROSE_OVERRIDE;
36 };
37 
40 public:
42  static Ptr instance() { return Ptr(new SwitchSuccessors); }
43  virtual bool operator()(bool chain, const Args&) ROSE_OVERRIDE;
44 };
45 
50 std::vector<Function::Ptr> findInterruptFunctions(const Partitioner&, rose_addr_t vectorVa);
51 
52 } // namespace
53 } // namespace
54 } // namespace
55 } // namespace
56 
57 #endif
58 #endif
Base class for matching function padding.
Definition: Modules.h:138
Base class for adjusting basic blocks during discovery.
Definition: Modules.h:43
Base class for matching function prologues.
Definition: Modules.h:112
virtual rose_addr_t match(const Partitioner &, rose_addr_t anchor) ROSE_OVERRIDE
Attempt to match padding.
STL namespace.
Main namespace for the ROSE library.
Adjusts basic block successors for M68k "switch" statements.
Definition: ModulesM68k.h:39
Sawyer::SharedPointer< FunctionPaddingMatcher > Ptr
Shared-ownership pointer to a FunctionPaddingMatcher.
Definition: Modules.h:141
virtual bool operator()(bool chain, const Args &) ROSE_OVERRIDE
Callback method.
Sawyer::SharedPointer< FunctionPrologueMatcher > Ptr
Shared-ownership pointer to a FunctionPrologueMatcher.
Definition: Modules.h:115
Sawyer::SharedPointer< BasicBlockCallback > Ptr
Shared-ownership pointer to a BasicBlockCallback.
Definition: Modules.h:46
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:322
std::vector< Function::Ptr > findInterruptFunctions(const Partitioner &, rose_addr_t vectorVa)
Find functions for an interrupt vector.