ROSE  0.11.109.0
ModulesM68k.h
1 #ifndef ROSE_BinaryAnalysis_Partitioner2_ModulesM68k_H
2 #define ROSE_BinaryAnalysis_Partitioner2_ModulesM68k_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/Partitioner2/Function.h>
7 #include <Rose/BinaryAnalysis/Partitioner2/Partitioner.h>
8 
9 namespace Rose {
10 namespace BinaryAnalysis {
11 namespace Partitioner2 {
12 
14 namespace ModulesM68k {
15 
20 protected:
21  Function::Ptr function_;
22 public:
24  static Ptr instance() { return Ptr(new MatchLink); }
25  virtual std::vector<Function::Ptr> functions() const override { return std::vector<Function::Ptr>(1, function_); }
26  virtual bool match(const Partitioner&, rose_addr_t anchor) override;
27 };
28 
31 public:
33  static Ptr instance() { return Ptr(new MatchFunctionPadding); }
34  virtual rose_addr_t match(const Partitioner&, rose_addr_t anchor) override;
35 };
36 
39 public:
41  static Ptr instance() { return Ptr(new SwitchSuccessors); }
42  virtual bool operator()(bool chain, const Args&) override;
43 };
44 
49 std::vector<Function::Ptr> findInterruptFunctions(const Partitioner&, rose_addr_t vectorVa);
50 
51 } // namespace
52 } // namespace
53 } // namespace
54 } // namespace
55 
56 #endif
57 #endif
Base class for matching function padding.
Definition: Modules.h:137
Base class for adjusting basic blocks during discovery.
Definition: Modules.h:42
Base class for matching function prologues.
Definition: Modules.h:111
virtual bool operator()(bool chain, const Args &) override
Callback method.
Main namespace for the ROSE library.
virtual rose_addr_t match(const Partitioner &, rose_addr_t anchor) override
Attempt to match padding.
Adjusts basic block successors for M68k "switch" statements.
Definition: ModulesM68k.h:38
Sawyer::SharedPointer< FunctionPaddingMatcher > Ptr
Shared-ownership pointer to a FunctionPaddingMatcher.
Definition: Modules.h:140
Sawyer::SharedPointer< FunctionPrologueMatcher > Ptr
Shared-ownership pointer to a FunctionPrologueMatcher.
Definition: Modules.h:114
Sawyer::SharedPointer< BasicBlockCallback > Ptr
Shared-ownership pointer to a BasicBlockCallback.
Definition: Modules.h:45
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:294
std::vector< Function::Ptr > findInterruptFunctions(const Partitioner &, rose_addr_t vectorVa)
Find functions for an interrupt vector.