ROSE 0.11.145.147
ModulesLinux.h
1#ifndef ROSE_BinaryAnalysis_Partitioner2_ModulesLinux_H
2#define ROSE_BinaryAnalysis_Partitioner2_ModulesLinux_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/Partitioner2/Modules.h>
6
7#include <Rose/BinaryAnalysis/SystemCall.h>
8#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/BasicTypes.h>
9
10namespace Rose {
11namespace BinaryAnalysis {
12namespace Partitioner2 {
13
15namespace ModulesLinux {
16
18SystemCall systemCallAnalyzer(const PartitionerConstPtr&, const boost::filesystem::path &syscallHeader = "");
19
25 SystemCall analyzer_;
26protected:
27 SyscallSuccessors(const PartitionerConstPtr&, const boost::filesystem::path &syscallHeader);
28public:
32 static Ptr instance(const PartitionerConstPtr&, const boost::filesystem::path &syscallHeader = "");
33
34 virtual bool operator()(bool chain, const Args&) override;
35};
36
43public:
46
47 static Ptr instance() { return Ptr(new LibcStartMain); }
48 virtual bool operator()(bool chain, const Args&) override;
49
52
53private:
54 // Read a value from the stack
56 readStack(const PartitionerConstPtr &partitioner, const InstructionSemantics::BaseSemantics::DispatcherPtr &cpu, int byteOffset,
57 size_t nBitsToRead, RegisterDescriptor segmentRegister);
58};
59
64void nameSystemCalls(const PartitionerConstPtr&, const boost::filesystem::path &syscallHeader = "");
65
66} // namespace
67} // namespace
68} // namespace
69} // namespace
70
71#endif
72#endif
Base class for adjusting basic blocks during discovery.
Definition Modules.h:39
Basic block callback to add "main" address as a function.
virtual bool operator()(bool chain, const Args &) override
Callback method.
void nameMainFunction(const PartitionerConstPtr &) const
Give the name "main" to the main function if it has no name yet.
Sawyer::SharedPointer< LibcStartMain > Ptr
Shared ownership pointer to LibcStartMain callback.
Basic block callback to detect system calls that don't return.
virtual bool operator()(bool chain, const Args &) override
Callback method.
static Ptr instance(const PartitionerConstPtr &, const boost::filesystem::path &syscallHeader="")
Allocating constructor.
Describes (part of) a physical CPU register.
Analyzes basic blocks to get system call names.
Definition SystemCall.h:22
Holds a value or nothing.
Definition Optional.h:56
boost::shared_ptr< Dispatcher > DispatcherPtr
Shared-ownership pointer to a semantics instruction dispatcher.
void nameSystemCalls(const PartitionerConstPtr &, const boost::filesystem::path &syscallHeader="")
Adds comments to system call instructions.
SystemCall systemCallAnalyzer(const PartitionerConstPtr &, const boost::filesystem::path &syscallHeader="")
Create a system call analyzer suitable for this architecture.
The ROSE library.