ROSE 0.11.145.147
|
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.
#include <Rose/BinaryAnalysis/Partitioner2/Modules.h>
Public Types | |
typedef std::pair< rose_addr_t, rose_addr_t > | AddressPair |
Pairs of old and new addresses. | |
typedef Sawyer::SharedPointer< IpRewriter > | Ptr |
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. | |
SharedObject & | operator= (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) | |
typedef std::pair<rose_addr_t, rose_addr_t> Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter::AddressPair |
typedef Sawyer::SharedPointer<IpRewriter> Rose::BinaryAnalysis::Partitioner2::Modules::IpRewriter::Ptr |
Shared-ownership pointer to a IpRewriter.
See Shared ownership.
|
inlineprotected |
|
inlinestatic |
|
inline |
Property: Pairs of old/new addresses to rewrite.
Definition at line 261 of file Modules.h.
Referenced by instance().
|
inline |
|
inline |
|
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.