ROSE  0.9.11.42
ModulesPowerpc.h
1 #ifndef ROSE_Partitioner2_ModulesPowerpc_H
2 #define ROSE_Partitioner2_ModulesPowerpc_H
3 
4 #include <Partitioner2/Modules.h>
5 
6 namespace Rose {
7 namespace BinaryAnalysis {
8 namespace Partitioner2 {
9 
11 namespace ModulesPowerpc {
12 
15 protected:
16  Function::Ptr function_;
17 public:
18  static Ptr instance() { return Ptr(new MatchStwuPrologue); }
19  virtual std::vector<Function::Ptr> functions() const ROSE_OVERRIDE;
20  virtual bool match(const Partitioner&, rose_addr_t anchor) ROSE_OVERRIDE;
21 };
22 
24 bool matchElfDynamicStub(const Partitioner&, const Function::Ptr&, const AddressIntervalSet &pltAddresses);
25 
27 void nameImportThunks(const Partitioner&, SgAsmInterpretation*);
28 
29 } // namespace
30 } // namespace
31 } // namespace
32 } // namespace
33 
34 #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:108
Main namespace for the ROSE library.
Reference-counting smart pointer.
Definition: SharedPointer.h:67
bool 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:111
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:293
void nameImportThunks(const Partitioner &, SgAsmInterpretation *)
Give names to thunks for dynamically linked functions.
Represents an interpretation of a binary container.