ROSE 0.11.145.277
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Rose::BinaryAnalysis::Partitioner2::MemoryTable Class Reference

Description

Utilities for working with tables.

A table is an area of memory that has homogeneously sized entries. The actual starting address of the table is often initially unknown as is its size. These values are obtained by attempting to parse the table from memory.

Definition at line 18 of file MemoryTable.h.

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

Inheritance diagram for Rose::BinaryAnalysis::Partitioner2::MemoryTable:
Inheritance graph
[legend]

Classes

class  Entries
 Represents the entries in the table. More...
 
class  Storage
 Represents the storage for the table. More...
 

Public Types

using Ptr = MemoryTablePtr
 Shared ownership pointer.
 
using ConstPtr = MemoryTableConstPtr
 Shared ownership pointer.
 

Public Member Functions

size_t bytesPerEntry () const
 Property: Bytes per entry.
 
Entries::Ptr entries () const
 Property: Table entries.
 
AddressInterval location () const
 Result: Table location in memory.
 
bool empty () const
 Result: True if the table has no valid entries.
 
size_t nEntries () const
 Result: Total number of valid entries scanned into the table.
 
size_t nPreEntries () const
 Result: Number of entries detected before the start of table.
 
size_t maxInitialSkip () const
 Property: Max initial invalid entries.
 
void maxInitialSkip (size_t)
 Property: Max initial invalid entries.
 
size_t maxPreEntries () const
 Property: Max number of entries to prepend before the original start of the table.
 
void maxPreEntries (size_t)
 Property: Max number of entries to prepend before the original start of the table.
 
AddressInterval tableLimits () const
 Property: Limits for table location.
 
void tableLimits (const AddressInterval &)
 Property: Limits for table location.
 
AddressInterval scan (const MemoryMap::Constraints &, Address probableTableAddr)
 Scan the table and return its location.
 
AddressInterval scan (const PartitionerConstPtr &, const InstructionSemantics::BaseSemantics::RiscOperatorsPtr &, Address probableTableAddr)
 Scan the table and return its location.
 
AddressInterval scan (const Storage::Ptr &, Address probableTableAddr)
 Scan the table and return its location.
 

Static Public Member Functions

static Ptr instance (const AddressInterval &tableLimits, size_t bytesPerEntry, const Entries::Ptr &entries)
 Allocating constructor.
 

Protected Member Functions

 MemoryTable (const AddressInterval &, size_t bytesPerEntry, const Entries::Ptr &entries)
 

Member Typedef Documentation

◆ Ptr

Shared ownership pointer.

Definition at line 23 of file MemoryTable.h.

◆ ConstPtr

Shared ownership pointer.

Definition at line 24 of file MemoryTable.h.

Member Function Documentation

◆ instance()

static Ptr Rose::BinaryAnalysis::Partitioner2::MemoryTable::instance ( const AddressInterval tableLimits,
size_t  bytesPerEntry,
const Entries::Ptr entries 
)
static

Allocating constructor.

Construct a table that may exist at the locations specified by the tableLimits. Each entry of the table is a known size. The supplied entries object is reponsible for parsing table entries.

◆ maxInitialSkip() [1/2]

size_t Rose::BinaryAnalysis::Partitioner2::MemoryTable::maxInitialSkip ( ) const

Property: Max initial invalid entries.

The maximum number of invalid entries that can be skipped when looking for the start of the table.

◆ maxInitialSkip() [2/2]

void Rose::BinaryAnalysis::Partitioner2::MemoryTable::maxInitialSkip ( size_t  )

Property: Max initial invalid entries.

The maximum number of invalid entries that can be skipped when looking for the start of the table.

◆ tableLimits() [1/2]

AddressInterval Rose::BinaryAnalysis::Partitioner2::MemoryTable::tableLimits ( ) const

Property: Limits for table location.

After scanning, the actual table (its entries) will all exist within these limits.

◆ tableLimits() [2/2]

void Rose::BinaryAnalysis::Partitioner2::MemoryTable::tableLimits ( const AddressInterval )

Property: Limits for table location.

After scanning, the actual table (its entries) will all exist within these limits.

◆ bytesPerEntry()

size_t Rose::BinaryAnalysis::Partitioner2::MemoryTable::bytesPerEntry ( ) const

Property: Bytes per entry.

This is read-only, set by the constructor.

◆ scan() [1/3]

AddressInterval Rose::BinaryAnalysis::Partitioner2::MemoryTable::scan ( const MemoryMap::Constraints ,
Address  probableTableAddr 
)

Scan the table and return its location.

Its location is also saved in this object and available by calling location.

◆ scan() [2/3]

AddressInterval Rose::BinaryAnalysis::Partitioner2::MemoryTable::scan ( const PartitionerConstPtr ,
const InstructionSemantics::BaseSemantics::RiscOperatorsPtr ,
Address  probableTableAddr 
)

Scan the table and return its location.

Its location is also saved in this object and available by calling location.

◆ scan() [3/3]

AddressInterval Rose::BinaryAnalysis::Partitioner2::MemoryTable::scan ( const Storage::Ptr ,
Address  probableTableAddr 
)

Scan the table and return its location.

Its location is also saved in this object and available by calling location.

◆ location()

AddressInterval Rose::BinaryAnalysis::Partitioner2::MemoryTable::location ( ) const

Result: Table location in memory.

The table location is continually updated during the scan call, making it available when parsing entries.

◆ nPreEntries()

size_t Rose::BinaryAnalysis::Partitioner2::MemoryTable::nPreEntries ( ) const

Result: Number of entries detected before the start of table.

This is the number of entries detected by the scan function that occur prior to its probable table address.


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