1 #ifndef ROSE_BinaryAnalysis_BinaryToSource_H
2 #define ROSE_BinaryAnalysis_BinaryToSource_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
6 #include <Diagnostics.h>
7 #include <Partitioner2/Partitioner.h>
8 #include <RoseException.h>
9 #include <Sawyer/CommandLine.h>
10 #include <SourceAstSemantics2.h>
11 #include <TraceSemantics2.h>
50 : traceRiscOps(false), traceInsnExecution(false), allocateMemoryArray(false), zeroMemoryArray(false) {}
74 : disassembler_(NULL) {}
81 : settings_(settings), disassembler_(NULL) {}
104 #if 0 // [Robb P. Matzke 2015-10-06]: not implemented yet
121 void declareGlobalRegisters(std::ostream&);
124 void defineInterrupts(std::ostream&);
127 void emitEffects(std::ostream&);
void generateSource(const Partitioner2::Partitioner &, std::ostream &)
Generate source code as text.
bool zeroMemoryArray
Whether to zero the memory array, or just allocated with malloc.
Base class for machine instructions.
Sawyer::Optional< rose_addr_t > initialInstructionPointer
Optional initial value for the instruction pointer.
Sawyer::Optional< rose_addr_t > initialStackPointer
Optional initial value for the stack pointer.
Convert binary to low-level C source code.
static void initDiagnostics()
Initialize diagnostic streams.
static Sawyer::CommandLine::SwitchGroup commandLineSwitches(Settings &)
Command-line switch parsing.
A collection of related switch declarations.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to trace-semantics RISC operations.
bool traceInsnExecution
Generate code that prints instructions.
Main namespace for the ROSE library.
Exception(const std::string &mesg)
Constructs an exception with the specified message.
Exceptions thrown by this analysis.
BinaryToSource(const Settings &settings)
Construct the analyzer with specified settings.
boost::shared_ptr< Dispatcher > DispatcherPtr
Shared-ownership pointer to a semantics instruction dispatcher.
Sawyer::Optional< rose_addr_t > allocateMemoryArray
Whether to allocate the global memory array.
BinaryToSource()
Default constructor.
const Settings & settings() const
Property: Configuration settings.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer for basic semantic operations.
Settings to control this translator's behavior.
Settings()
Constructs the default settings.
bool traceRiscOps
Trace the RISC operators for debugging.
Partitions instructions into basic blocks and functions.
Base class for all ROSE exceptions.
Virtual base class for instruction disassemblers.