1 #ifndef ROSE_BinaryAnalysis_ToSource_H
2 #define ROSE_BinaryAnalysis_ToSource_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
6 #include <Rose/BinaryAnalysis/Disassembler/BasicTypes.h>
7 #include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
8 #include <Rose/BinaryAnalysis/InstructionSemantics/SourceAstSemantics.h>
9 #include <Rose/BinaryAnalysis/InstructionSemantics/TraceSemantics.h>
10 #include <Rose/Diagnostics.h>
11 #include <Rose/Exception.h>
13 #include <Sawyer/CommandLine.h>
16 namespace BinaryAnalysis {
52 : traceRiscOps(false), traceInsnExecution(false), allocateMemoryArray(false), zeroMemoryArray(false) {}
106 #if 0 // [Robb P. Matzke 2015-10-06]: not implemented yet
123 void declareGlobalRegisters(std::ostream&);
126 void defineInterrupts(std::ostream&);
129 void emitEffects(std::ostream&);
bool zeroMemoryArray
Whether to zero the memory array, or just allocated with malloc.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer for basic semantic operations.
boost::shared_ptr< class RiscOperators > RiscOperatorsPtr
Shared-ownership pointer to trace-semantics RISC operations.
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.
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.
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.
void generateSource(const Partitioner2::PartitionerConstPtr &, std::ostream &)
Generate source code as text.
BinaryToSource()
Default constructor.
const Settings & settings() const
Property: Configuration settings.
Settings to control this translator's behavior.
Settings()
Constructs the default settings.
bool traceRiscOps
Trace the RISC operators for debugging.
Base class for all ROSE exceptions.