ROSE 0.11.145.192
|
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 22 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. | |
BinaryToSource (const Settings &) | |
Construct the analyzer with specified settings. | |
const Settings & | settings () const |
Property: Configuration settings. | |
void | generateSource (const Partitioner2::PartitionerConstPtr &, std::ostream &) |
Generate source code as text. | |
Static Public Member Functions | |
static Sawyer::CommandLine::SwitchGroup | commandLineSwitches (Settings &) |
Command-line switch parsing. | |
static void | initDiagnostics () |
Initialize diagnostic streams. | |
Rose::BinaryAnalysis::BinaryToSource::BinaryToSource | ( | ) |
Default constructor.
Constructs an analysis object that is not tied to any particular architecture yet, and which uses default settings.
|
explicit |
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.
|
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 96 of file ToSource.h.
void Rose::BinaryAnalysis::BinaryToSource::generateSource | ( | const Partitioner2::PartitionerConstPtr & | , |
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.