ROSE  0.9.10.47
Namespaces | Classes | Typedefs | Functions
Rose::BinaryAnalysis Namespace Reference

Description

Binary analysis.

ROSE supports both source code analysis and binary analysis. This namespace contains most of the binary analysis features. The Binary analysis tutorial is a good place to get started, and most of its examples link to the API documentation. Follow those links to the enclosing class and/or namespace to obtain an overview of how those classes and namespaces work.

Namespaces

 Partitioner2
 Binary function detection.
 
 CallingConvention
 Support for binary calling conventions.
 
 Commit
 Whether to commit memory allocations.
 
 PointerDetection
 Pointer detection analysis.
 
 ReturnValueUsed
 Contains functions that analyze whether a function returns a value which is used by the caller.
 
 StackDelta
 Stack delta analysis.
 
 Strings
 Suport for finding strings in memory.
 
 SymbolicExpr
 Namespace supplying types and functions for symbolic expressions.
 
 InstructionSemantics2
 Binary instruction semantics.
 
 Unparser
 Generates pseudo-assembly listings.
 

Classes

class  BinaryDebugger
 Simple debugger. More...
 
class  Disassembler
 Virtual base class for instruction disassemblers. More...
 
class  DisassemblerArm
 Disassembler for the ARM architecture. More...
 
class  DisassemblerM68k
 Disassembler for Motorola M68k-based instruction set architectures. More...
 
class  DisassemblerMips
 
class  DisassemblerPowerpc
 Disassembler for the PowerPC architecture. More...
 
class  DisassemblerX86
 Disassembler for the x86 architecture. More...
 
class  RegisterParts
 Holds a set of registers without regard for register boundaries. More...
 
class  BinaryLoader
 Base class for loading a static or dynamic object. More...
 
class  BinaryLoaderElf
 
class  BinaryLoaderElfObj
 A loader suitable for ELF object files. More...
 
class  BinaryLoaderPe
 
class  InstructionProvider
 Provides and caches instructions. More...
 
class  MemoryMap
 An efficient mapping from an address space to stored data. More...
 
class  SRecord
 Motorola S-Record. More...
 
class  AbstractLocation
 Abstract location. More...
 
struct  InsnCFGVertexWriter
 A vertex property writer for instruction-based CFGs. More...
 
class  AstHash
 A simple traversal that builds up a hash code for the AST. More...
 
class  BestMapAddress
 Finds best address for mapping code. More...
 
class  CodeInserter
 Insert new code in place of existing instructions. More...
 
class  ControlFlow
 Binary control flow analysis. More...
 
class  DataFlow
 Various tools for data-flow analysis. More...
 
class  Demangler
 
class  Dominance
 
class  FeasiblePath
 Feasible path analysis. More...
 
class  FunctionCall
 Binary function call analysis. More...
 
class  FunctionSimilarity
 Analysis to test the similarity of two functions. More...
 
class  MagicNumber
 
class  Matrix
 Matrix values. More...
 
class  NoOperation
 Analysis that looks for no-op equivalents. More...
 
class  Reachability
 Analysis that computes reachability of CFG vertices. More...
 
class  SmtSolverValidator
 Validates SMT solver name from command-line. More...
 
class  SmtlibSolver
 Wrapper around solvers that speak SMT-LIB. More...
 
class  CompareLeavesByName
 
class  SmtSolver
 Interface to Satisfiability Modulo Theory (SMT) solvers. More...
 
struct  StackVariableLocation
 Information about the location of a stack variable. More...
 
struct  StackVariableMeta
 Meta information for a stack variable. More...
 
struct  StackVariable
 A multi-byte variable that appears on the stack. More...
 
class  SymbolicExprParser
 Parses symbolic expressions from text. More...
 
class  TaintedFlow
 Various tools for performing tainted flow analysis. More...
 
class  BinaryToSource
 Convert binary to low-level C source code. More...
 
class  YicesSolver
 Interface to the Yices Satisfiability Modulo Theory (SMT) Solver. More...
 
class  Z3Solver
 Interface to the Z3 SMT solver. More...
 
class  DwarfLineMapper
 Build mappings between source locations and virtual addresses. More...
 
class  AsmFunctionIndex
 Functions indexed by entry address. More...
 
class  AsmUnparser
 Unparses binary AST into text. More...
 
class  SerialIo
 Base class for binary state input and output. More...
 
class  SerialOutput
 Output binary analysis state. More...
 
class  SerialInput
 Input binary analysis state. More...
 

Typedefs

typedef Sawyer::SharedPointer
< class SmtSolver
SmtSolverPtr
 Reference-counting pointer for SMT solvers. More...
 
typedef SmtSolver SMTSolver
 
typedef std::vector
< StackVariable
StackVariables
 Multiple stack variables. More...
 

Functions

std::ostream & operator<< (std::ostream &, const BinaryLoaderElf::VersionedSymbol &)
 
template<typename T >
alignUp (T address, T alignment)
 Align address downward to boundary. More...
 
template<typename T >
alignDown (T address, T alignment)
 Align address upward to boundary. More...
 
std::ostream & operator<< (std::ostream &, const AbstractLocation &)
 
template<class V , class E >
Sawyer::Container::Graph< V, E >
::VertexValue 
get_ast_node (const Sawyer::Container::Graph< V, E > &cfg, size_t vertexId)
 Return the AST node associated with a vertex. More...
 
template<class V , class E , class AstNode >
void put_ast_node (Sawyer::Container::Graph< V, E > &cfg, size_t vertexId, AstNode *astNode)
 Set the AST node associated with a vertex. More...
 
template<class A , class B , class C , class D , class E , class F , class G >
boost::property_traits
< typename boost::property_map
< boost::adjacency_list< A, B,
C, D, E, F, G >
, boost::vertex_name_t >::type >
::value_type 
get_ast_node (const boost::adjacency_list< A, B, C, D, E, F, G > &cfg, typename boost::graph_traits< boost::adjacency_list< A, B, C, D, E, F, G > >::vertex_descriptor vertex)
 
template<class A , class B , class C , class D , class E , class F , class G >
void put_ast_node (boost::adjacency_list< A, B, C, D, E, F, G > &cfg, typename boost::graph_traits< boost::adjacency_list< A, B, C, D, E, F, G > >::vertex_descriptor vertex, typename boost::property_traits< typename boost::property_map< boost::adjacency_list< A, B, C, D, E, F, G >, boost::vertex_name_t >::type >::value_type ast_node)
 
std::ostream & operator<< (std::ostream &, const FunctionSimilarity &)
 
bool listSmtSolverNames (std::ostream &)
 List known SMT solvers and their availability. More...
 
std::string validateSmtSolverName (const std::string &name)
 Validate SMT solver name. More...
 
std::string bestSmtSolverName ()
 SMT solver corresponding to "best". More...
 
void checkSmtCommandLineArg (const std::string &arg, const std::string &listSwitch, std::ostream &errorStream=std::cerr)
 Process SMT solver name from command-line. More...
 
std::string smtSolverDocumentationString (const std::string &dfltSolver)
 Documentation string for an SMT solver switch. More...
 
std::ostream & operator<< (std::ostream &, const SmtSolver::SExpr &)
 
std::ostream & operator<< (std::ostream &, const SymbolicExprParser::SyntaxError &)
 
std::ostream & operator<< (std::ostream &out, const TaintedFlow::State &state)
 
std::ostream & operator<< (std::ostream &, const DwarfLineMapper::SrcInfo &)
 
std::ostream & operator<< (std::ostream &, const DwarfLineMapper &)
 

Typedef Documentation

Reference-counting pointer for SMT solvers.

Definition at line 22 of file BinarySmtSolver.h.

Multiple stack variables.

Definition at line 88 of file BinaryStackVariable.h.

Function Documentation

template<typename T >
T Rose::BinaryAnalysis::alignUp ( address,
alignment 
)

Align address downward to boundary.

Returns the largest multiple of alignment which is less than or equal to address.

Definition at line 27 of file MemoryMap.h.

template<typename T >
T Rose::BinaryAnalysis::alignDown ( address,
alignment 
)

Align address upward to boundary.

Returns the smallest multiple of alignment which is greater than or equal to address. Returns zero if no such value can be returned due to overflow.

Definition at line 36 of file MemoryMap.h.

template<class V , class E >
Sawyer::Container::Graph<V, E>::VertexValue Rose::BinaryAnalysis::get_ast_node ( const Sawyer::Container::Graph< V, E > &  cfg,
size_t  vertexId 
)
template<class V , class E , class AstNode >
void Rose::BinaryAnalysis::put_ast_node ( Sawyer::Container::Graph< V, E > &  cfg,
size_t  vertexId,
AstNode *  astNode 
)
bool Rose::BinaryAnalysis::listSmtSolverNames ( std::ostream &  )

List known SMT solvers and their availability.

The names are listed alphabeticallly to the specified output stream. Returns true if any solvers are available, false if no solvers are available.

std::string Rose::BinaryAnalysis::validateSmtSolverName ( const std::string &  name)

Validate SMT solver name.

Returns an empty string if the name is valid, an error message otherwise.

std::string Rose::BinaryAnalysis::bestSmtSolverName ( )

SMT solver corresponding to "best".

Returns the name of the SMT solver that corresponds to the "best" solver. Returns an empty string if no solvers are available.

void Rose::BinaryAnalysis::checkSmtCommandLineArg ( const std::string &  arg,
const std::string &  listSwitch,
std::ostream &  errorStream = std::cerr 
)

Process SMT solver name from command-line.

Checks that the specified SMT solver name is valid, empty, "best", or "none". Returns if the check is successful, or prints an error message and exits if the check is unsuccessful. If an error occurs, and listSwitch is non-empty then a second error message is shown that says "use xxxx to get a list of supported solvers".

std::string Rose::BinaryAnalysis::smtSolverDocumentationString ( const std::string &  dfltSolver)

Documentation string for an SMT solver switch.