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

#include <Rose/BinaryAnalysis/Partitioner2/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.
 
typedef Sawyer::SharedPointer< IpRewriterPtr
 Shared-ownership pointer to a IpRewriter.
 
- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::BasicBlockCallback
enum  Termination {
  CONTINUE_DISCOVERY ,
  TERMINATE_NOW ,
  TERMINATE_PRIOR
}
 Whether to terminate a basic block. More...
 
using Ptr = BasicBlockCallbackPtr
 Shared-ownership pointer to a BasicBlockCallback.
 

Public Member Functions

virtual bool operator() (bool chain, const Args &) override
 Callback method.
 
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.
 
 SharedObject (const SharedObject &)
 Copy constructor.
 
virtual ~SharedObject ()
 Virtual destructor.
 
SharedObjectoperator= (const SharedObject &)
 Assignment.
 

Static Public Member Functions

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

Protected Member Functions

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

Member Typedef Documentation

◆ AddressPair

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.

◆ Ptr

Shared-ownership pointer to a IpRewriter.

See Shared ownership.

Definition at line 251 of file Modules.h.

Constructor & Destructor Documentation

◆ IpRewriter()

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

Definition at line 246 of file Modules.h.

Member Function Documentation

◆ instance()

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

Constructor.

Definition at line 254 of file Modules.h.

References rewrites().

◆ rewrites() [1/3]

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

Property: Pairs of old/new addresses to rewrite.

Definition at line 261 of file Modules.h.

Referenced by instance().

◆ rewrites() [2/3]

std::vector< AddressPair > & Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter::rewrites ( )
inline

Property: Pairs of old/new addresses to rewrite.

Definition at line 262 of file Modules.h.

◆ rewrites() [3/3]

void Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter::rewrites ( std::vector< AddressPair > &  v)
inline

Property: Pairs of old/new addresses to rewrite.

Definition at line 263 of file Modules.h.

◆ operator()()

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

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: