ROSE  0.9.10.54
Classes | Public Member Functions | List of all members
Rose::BinaryAnalysis::BinaryToSource Class Reference

Description

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 15 of file BinaryToSource.h.

#include <BinaryToSource.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 Settingssettings () const
 Property: Configuration settings. More...
 
void generateSource (const Partitioner2::Partitioner &, std::ostream &)
 Generate source code as text. More...
 

Constructor & Destructor Documentation

Rose::BinaryAnalysis::BinaryToSource::BinaryToSource ( )
inline

Default constructor.

Constructs an analysis object that is not tied to any particular architecture yet, and which uses default settings.

Definition at line 64 of file BinaryToSource.h.

Rose::BinaryAnalysis::BinaryToSource::BinaryToSource ( const Settings settings)
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 71 of file BinaryToSource.h.

Member Function Documentation

const Settings& Rose::BinaryAnalysis::BinaryToSource::settings ( ) const
inline

Property: Configuration settings.

This property is read-only. The settings must be specified in the constructor.

Definition at line 77 of file BinaryToSource.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.


The documentation for this class was generated from the following file: