ROSE  0.11.21.0
ModulesPowerpc.h
1 #ifndef ROSE_Partitioner2_ModulesPowerpc_H
2 #define ROSE_Partitioner2_ModulesPowerpc_H
3 
4 #include <featureTests.h>
5 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
6 #include <Partitioner2/Modules.h>
7 
8 #include <boost/logic/tribool.hpp>
9 
10 namespace Rose {
11 namespace BinaryAnalysis {
12 namespace Partitioner2 {
13 
15 namespace ModulesPowerpc {
16 
19 protected:
20  Function::Ptr function_;
21 public:
22  static Ptr instance() { return Ptr(new MatchStwuPrologue); }
23  virtual std::vector<Function::Ptr> functions() const ROSE_OVERRIDE;
24  virtual bool match(const Partitioner&, rose_addr_t anchor) ROSE_OVERRIDE;
25 };
26 
31 Sawyer::Optional<rose_addr_t>
32 matchElfDynamicStub(const Partitioner&, const Function::Ptr&, const AddressIntervalSet &pltAddresses);
33 
35 void nameImportThunks(const Partitioner&, SgAsmInterpretation*);
36 
40 boost::logic::tribool isFunctionReturn(const Partitioner&, const BasicBlock::Ptr&);
41 
42 } // namespace
43 } // namespace
44 } // namespace
45 } // namespace
46 
47 #endif
48 #endif
virtual std::vector< Function::Ptr > functions() const ROSE_OVERRIDE
Returns the function(s) for the previous successful match.
Base class for matching function prologues.
Definition: Modules.h:112
Main namespace for the ROSE library.
Name space for the entire 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:115
virtual bool match(const Partitioner &, rose_addr_t anchor) ROSE_OVERRIDE
Attempt to match an instruction pattern.
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:322
void nameImportThunks(const Partitioner &, SgAsmInterpretation *)
Give names to thunks for dynamically linked functions.
Represents an interpretation of a binary container.