ROSE 0.11.145.192
Public Types | Public Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::FunctionPaddingMatcher Class Referenceabstract

Description

Base class for matching function padding.

Function padding is bytes that appear immediately prior to the entry address of a function usually in order to align the function on a suitable boundary. Some assemblers emit zero bytes, others emit no-op instructions, and still others emit combinations of no-ops and zeros. It's conceivable that some compiler might even emit random garbage.

Definition at line 134 of file Modules.h.

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

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

Public Types

using Ptr = FunctionPaddingMatcherPtr
 Shared-ownership pointer to a FunctionPaddingMatcher.
 

Public Member Functions

virtual rose_addr_t match (const PartitionerConstPtr &, rose_addr_t anchor)=0
 Attempt to match padding.
 
- Public Member Functions inherited from Sawyer::SharedObject
 SharedObject ()
 Default constructor.
 
 SharedObject (const SharedObject &)
 Copy constructor.
 
virtual ~SharedObject ()
 Virtual destructor.
 
SharedObjectoperator= (const SharedObject &)
 Assignment.
 

Member Typedef Documentation

◆ Ptr

Shared-ownership pointer to a FunctionPaddingMatcher.

See Shared ownership.

Definition at line 137 of file Modules.h.

Member Function Documentation

◆ match()

virtual rose_addr_t Rose::BinaryAnalysis::Partitioner2::FunctionPaddingMatcher::match ( const PartitionerConstPtr ,
rose_addr_t  anchor 
)
pure virtual

Attempt to match padding.

Attempts to match function padding that ends at the address immediately prior to anchor. If a match is successful then the return value is the starting address for the padding and must be less than anchor. When no match is found then anchor is returned. The size of the matched padding is always anchor-retval where retval is the returned value.

Implemented in Rose::BinaryAnalysis::Partitioner2::ModulesM68k::MatchFunctionPadding.


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