Otawa
0.10
|
Represents a value of the data state. More...
#include <otawa/dfa/State.h>
Classes | |
class | MemIter |
class | RegIter |
Public Types | |
typedef t::uint32 | address_t |
Public Member Functions | |
State (Process &process) | |
Build the initial state. More... | |
Process & | process (void) const |
void | set (const hard::Register *reg, Value value) |
Set the value of a register. More... | |
Value | get (const hard::Register *reg) const |
Get a register value. More... | |
void | record (const MemCell &cell) |
Record a configured memory item. More... | |
bool | isInitialized (Address addr) const |
Test if the current state contains initialized data. More... | |
void | get (const Address &a, t::uint8 &v) const |
Get a value from the initialized memory of the process. More... | |
void | get (const Address &a, t::uint16 &v) const |
Get a value from the initialized memory of the process. More... | |
void | get (const Address &a, t::uint32 &v) const |
Get a value from the initialized memory of the process. More... | |
void | get (const Address &a, t::uint64 &v) const |
Get a value from the initialized memory of the process. More... | |
void | get (const Address &a, float &v) const |
Get a value from the initialized memory of the process. More... | |
void | get (const Address &a, double &v) const |
Get a value from the initialized memory of the process. More... | |
void | get (const Address &a, Address &v) const |
Get a value from the initialized memory of the process. More... | |
Private Types | |
typedef avl::Map< const hard::Register *, Value > | reg_map_t |
typedef avl::Map< Address, MemCell > | mem_map_t |
Private Attributes | |
reg_map_t | regs |
stree::Tree< address_t, bool > | mem |
mem_map_t | cmem |
Process & | proc |
Represents a value of the data state.
Data flow state.
Often used to describe the initial state as the join of the user external information on data state and from the initialized data state from the executable content.
|
private |
|
private |
otawa::dfa::State::State | ( | Process & | process | ) |
Build the initial state.
process | Current process. |
References elm::stree::SegmentBuilder< K, T, class >::add(), elm::stree::SegmentBuilder< K, T, class >::make(), mem, and proc.
Value otawa::dfa::State::get | ( | const hard::Register * | reg | ) | const |
Get a register value.
reg | Register to look for. |
References elm::avl::Map< K, T, C >::get(), and regs.
|
inline |
|
inline |
|
inline |
Test if the current state contains initialized data.
addr | Address to test. |
References otawa::Address::offset().
void otawa::dfa::State::record | ( | const MemCell & | cell | ) |
Record a configured memory item.
cell | Memory cell description to record. |
References otawa::dfa::MemCell::address(), cmem, and elm::avl::Map< K, T, C >::put().
Referenced by otawa::FlowFactLoader::onMemSet().
void otawa::dfa::State::set | ( | const hard::Register * | reg, |
Value | val | ||
) |
Set the value of a register.
reg | Set register. |
val | Set value. |
References elm::avl::Map< K, T, C >::hasKey(), elm::avl::Map< K, T, C >::put(), regs, and elm::avl::Map< K, T, C >::remove().
Referenced by otawa::FlowFactLoader::onRegSet().
|
private |
Referenced by State().