ROSE  0.9.10.196
ModulesLinux.h
1 #ifndef ROSE_Partitioner2_ModulesLinux_H
2 #define ROSE_Partitioner2_ModulesLinux_H
3 
4 #include <Partitioner2/Modules.h>
5 
6 #include <BinarySystemCall.h>
7 
8 namespace Rose {
9 namespace BinaryAnalysis {
10 namespace Partitioner2 {
11 
13 namespace ModulesLinux {
14 
16 SystemCall systemCallAnalyzer(const Partitioner&, const boost::filesystem::path &syscallHeader = "");
17 
23  SystemCall analyzer_;
24 protected:
25  SyscallSuccessors(const Partitioner&, const boost::filesystem::path &syscallHeader);
26 public:
30  static Ptr instance(const Partitioner&, const boost::filesystem::path &syscallHeader = "");
31 
32  virtual bool operator()(bool chain, const Args&) ROSE_OVERRIDE;
33 };
34 
41 public:
44 
45  static Ptr instance() { return Ptr(new LibcStartMain); }
46  virtual bool operator()(bool chain, const Args&) ROSE_OVERRIDE;
47 
49  void nameMainFunction(const Partitioner&) const;
50 };
51 
56 void nameSystemCalls(const Partitioner&, const boost::filesystem::path &syscallHeader = "");
57 
58 } // namespace
59 } // namespace
60 } // namespace
61 } // namespace
62 
63 #endif
64 
virtual bool operator()(bool chain, const Args &) ROSE_OVERRIDE
Callback method.
Base class for adjusting basic blocks during discovery.
Definition: Modules.h:38
Basic block callback to detect system calls that don't return.
Definition: ModulesLinux.h:22
Basic block callback to add "main" address as a function.
Definition: ModulesLinux.h:39
virtual bool operator()(bool chain, const Args &) ROSE_OVERRIDE
Callback method.
Sawyer::SharedPointer< LibcStartMain > Ptr
Shared ownership pointer to LibcStartMain callback.
Definition: ModulesLinux.h:43
Main namespace for the ROSE library.
SystemCall systemCallAnalyzer(const Partitioner &, const boost::filesystem::path &syscallHeader="")
Create a system call analyzer suitable for this architecture.
static Ptr instance(const Partitioner &, const boost::filesystem::path &syscallHeader="")
Allocating constructor.
Reference-counting smart pointer.
Definition: SharedPointer.h:67
Analyzes basic blocks to get system call names.
void nameMainFunction(const Partitioner &) const
Give the name "main" to the main function if it has no name yet.
void nameSystemCalls(const Partitioner &, const boost::filesystem::path &syscallHeader="")
Adds comments to system call instructions.
Partitions instructions into basic blocks and functions.
Definition: Partitioner.h:293