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


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 237 of file Modules.h.

#include <Rose/BinaryAnalysis/Partitioner2/Modules.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter:
Inheritance graph
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter:
Collaboration graph

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 {
 Whether to terminate a basic block. More...
using Ptr = BasicBlockCallbackPtr
 Shared-ownership pointer to a BasicBlockCallback. More...

Public Member Functions

virtual bool operator() (bool chain, const Args &) 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 240 of file Modules.h.

Shared-ownership pointer to a IpRewriter.

See Shared ownership.

Definition at line 251 of file Modules.h.

Member Function Documentation

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


Definition at line 254 of file Modules.h.

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

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: