ROSE
0.11.82.0
|
Convert binary to low-level C source code.
This analysis generates very low-level C source code that is as close as possible to the binary. This is not a decompiler; the source that gets generated is hardly human readable, but it can be fed into source code analysis functions.
Definition at line 20 of file ToSource.h.
#include <Rose/BinaryAnalysis/ToSource.h>
Classes | |
class | Exception |
Exceptions thrown by this analysis. More... | |
struct | Settings |
Settings to control this translator's behavior. More... | |
Public Member Functions | |
BinaryToSource () | |
Default constructor. More... | |
BinaryToSource (const Settings &settings) | |
Construct the analyzer with specified settings. More... | |
const Settings & | settings () const |
Property: Configuration settings. More... | |
void | generateSource (const Partitioner2::Partitioner &, std::ostream &) |
Generate source code as text. More... | |
Static Public Member Functions | |
static Sawyer::CommandLine::SwitchGroup | commandLineSwitches (Settings &) |
Command-line switch parsing. More... | |
static void | initDiagnostics () |
Initialize diagnostic streams. More... | |
|
inline |
Default constructor.
Constructs an analysis object that is not tied to any particular architecture yet, and which uses default settings.
Definition at line 73 of file ToSource.h.
|
inlineexplicit |
Construct the analyzer with specified settings.
Constructs an analysis object that is not tied to any particular architecture yet, but which uses the specified settings.
Definition at line 80 of file ToSource.h.
|
static |
Command-line switch parsing.
|
static |
Initialize diagnostic streams.
This is called automatically by Rose::Diagnostics::initialize.
|
inline |
Property: Configuration settings.
This property is read-only. The settings must be specified in the constructor.
Definition at line 94 of file ToSource.h.
void Rose::BinaryAnalysis::BinaryToSource::generateSource | ( | const Partitioner2::Partitioner & | , |
std::ostream & | |||
) |
Generate source code as text.
Emits C source code to the specified output stream. The output will be one C compilation unit that represents the entire binary specimen contained in the partitioner. This method takes a partitioner rather than a binary AST because the partitioner's data structures are more efficient for anaysis. A partitioner can be constructed from an AST if necessary.