ROSE 0.11.145.277
|
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>
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) | |
Shared ownership pointer.
Definition at line 23 of file MemoryTable.h.
Shared ownership pointer.
Definition at line 24 of file MemoryTable.h.
|
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.
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.
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.
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.
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.
size_t Rose::BinaryAnalysis::Partitioner2::MemoryTable::bytesPerEntry | ( | ) | const |
Property: Bytes per entry.
This is read-only, set by the constructor.
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.
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.
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.
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.
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.