ROSE  0.11.87.0
ModulesPowerpc.h
1 #ifndef ROSE_BinaryAnalysis_Partitioner2_ModulesPowerpc_H
2 #define ROSE_BinaryAnalysis_Partitioner2_ModulesPowerpc_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 #include <Rose/BinaryAnalysis/Partitioner2/Modules.h>
6 
7 #include <boost/logic/tribool.hpp>
8 
9 namespace Rose {
10 namespace BinaryAnalysis {
11 namespace Partitioner2 {
12 
14 namespace ModulesPowerpc {
15 
18 protected:
19  Function::Ptr function_;
20 public:
21  static Ptr instance() { return Ptr(new MatchStwuPrologue); }
22  virtual std::vector<Function::Ptr> functions() const override;
23  virtual bool match(const Partitioner&, rose_addr_t anchor) override;
24 };
25 
31 matchElfDynamicStub(const Partitioner&, const Function::Ptr&, const AddressIntervalSet &pltAddresses);
32 
35 
39 boost::logic::tribool isFunctionReturn(const Partitioner&, const BasicBlock::Ptr&);
40 
41 } // namespace
42 } // namespace
43 } // namespace
44 } // namespace
45 
46 #endif
47 #endif
Base class for matching function prologues.
Definition: Modules.h:111
Main namespace for the ROSE library.
boost::logic::tribool isFunctionReturn(const Partitioner &, const BasicBlock::Ptr &)
Determines whether basic block is a function return.
Sawyer::Optional< rose_addr_t > matchElfDynamicStub(const Partitioner &, const Function::Ptr &, const AddressIntervalSet &pltAddresses)
Matches a PowerPC ELF dynamic function stub.
Sawyer::SharedPointer< FunctionPrologueMatcher > Ptr
Shared-ownership pointer to a FunctionPrologueMatcher.
Definition: Modules.h:114
virtual std::vector< Function::Ptr > functions() const override
Returns the function(s) for the previous successful match.
virtual bool match(const Partitioner &, rose_addr_t anchor) override
Attempt to match an instruction pattern.
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:289
void nameImportThunks(const Partitioner &, SgAsmInterpretation *)
Give names to thunks for dynamically linked functions.
Represents an interpretation of a binary container.