Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher Struct Reference


Matches an ELF PLT entry.

The address through which the PLT entry branches is remembered. This address is typically an RVA which is added to the initial base address.

Definition at line 34 of file ModulesElf.h.

#include <ModulesElf.h>

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher:
Inheritance graph
Collaboration diagram for Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher:
Collaboration graph

Public Member Functions

 PltEntryMatcher (rose_addr_t base)
virtual bool match (const Partitioner &, rose_addr_t anchor)
 Attempt to match an instruction pattern. More...
rose_addr_t memAddress () const
size_t nBytesMatched () const
- 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 (rose_addr_t base)

Public Attributes

rose_addr_t baseVa_
rose_addr_t memAddress_
size_t nBytesMatched_

Additional Inherited Members

- Public Types inherited from Rose::BinaryAnalysis::Partitioner2::InstructionMatcher
typedef Sawyer::SharedPointer< InstructionMatcherPtr
 Shared-ownership pointer to an InstructionMatcher. More...

Member Function Documentation

virtual bool Rose::BinaryAnalysis::Partitioner2::ModulesElf::PltEntryMatcher::match ( const Partitioner ,
rose_addr_t  anchor 

Attempt to match an instruction pattern.

If the subclass implementation is able to match instructions, bytes, etc. anchored at the anchor address then it should return true, otherwise false. The anchor address will always be valid for the situation (e.g., if the partitioner is trying to match something anchored at an address that is not in the CFG, then the anchor will be such an address; if it is trying to match something that is definitely an instruction then the address will be mapped with execute permission; etc.). This precondition makes writing matchers that match against a single address easier to write, but matchers that match at additional locations must explicitly check those other locations with the same conditions (FIXME[Robb P. Matzke 2014-08-04]: perhaps we should pass those conditions as an argument).

Implements Rose::BinaryAnalysis::Partitioner2::InstructionMatcher.

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