ROSE  0.10.0.0
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter Class Reference

Description

Callback to rewrite CFG edges.

This basic block callback looks for instructions that have a CFG successor edge that points to a particular address and replaces it with a successor edge that points to a different address.

Definition at line 241 of file Modules.h.

#include <Modules.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter:
Inheritance graph
[legend]
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter:
Collaboration graph
[legend]

Public Types

typedef std::pair< rose_addr_t, rose_addr_t > AddressPair
 Pairs of old and new addresses. More...
 
typedef Sawyer::SharedPointer< IpRewriterPtr
 Shared-ownership pointer to a IpRewriter. More...
 
- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback
enum  Termination {
  CONTINUE_DISCOVERY,
  TERMINATE_NOW,
  TERMINATE_PRIOR
}
 Whether to terminate a basic block. More...
 
typedef Sawyer::SharedPointer< BasicBlockCallbackPtr
 Shared-ownership pointer to a BasicBlockCallback. More...
 

Public Member Functions

virtual bool operator() (bool chain, const Args &) ROSE_OVERRIDE
 Callback method. More...
 
const std::vector< AddressPair > & rewrites () const
 Property: Pairs of old/new addresses to rewrite.
 
std::vector< AddressPair > & rewrites ()
 Property: Pairs of old/new addresses to rewrite.
 
void rewrites (std::vector< AddressPair > &v)
 Property: Pairs of old/new addresses to rewrite.
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor. More...
 
 SharedObject (const SharedObject &)
 Copy constructor. More...
 
virtual ~SharedObject ()
 Virtual destructor. More...
 
SharedObjectoperator= (const SharedObject &)
 Assignment. More...
 

Static Public Member Functions

static Ptr instance (const std::vector< AddressPair > &rewrites)
 Constructor. More...
 

Protected Member Functions

 IpRewriter (const std::vector< AddressPair > &rewrites)
 

Member Typedef Documentation

typedef std::pair<rose_addr_t, rose_addr_t> Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter::AddressPair

Pairs of old and new addresses.

Definition at line 244 of file Modules.h.

Shared-ownership pointer to a IpRewriter.

See Shared ownership.

Definition at line 255 of file Modules.h.

Member Function Documentation

static Ptr Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter::instance ( const std::vector< AddressPair > &  rewrites)
inlinestatic

Constructor.

Definition at line 258 of file Modules.h.

virtual bool Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter::operator() ( bool  chain,
const Args  
)
virtual

Callback method.

This is the method invoked for the callback. The chain argument is the return value from the previous callback in the list (true for the first callback). The successor callbacks use chain to indicate whether subsequent callbacks should do anything.

Implements Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback.


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