ROSE 0.11.145.192
|
Addresses for base address space.
Address spaces have many different types of addresses that fall into the following categories:
This class encapsulates address types and is usually used as an argument for functions that operate on addresses.
Definition at line 30 of file AddressSpace.h.
#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/AddressSpace.h>
Public Member Functions | |
AddressSpaceAddress () | |
Construct a null address. | |
AddressSpaceAddress (RegisterDescriptor) | |
Construct an address that's a concrete register. | |
AddressSpaceAddress (Address) | |
Construct an address that's a concrete value. | |
AddressSpaceAddress (const SValuePtr &) | |
Construct an address that's an abstract value. | |
bool | isEmpty () const |
True if the address is null. | |
Sawyer::Optional< Address > | toConcrete () const |
Convert an address to a concrete value if possible. | |
SValuePtr | toAbstract (RiscOperators &addrOps) const |
Convert an address to an abstract value if possible. | |
RegisterDescriptor | registerDescriptor () const |
Return the underlying address. | |
const Sawyer::Optional< Address > & | concrete () const |
Return the underlying address. | |
SValuePtr | abstract () const |
Return the underlying address. | |
RegisterDescriptor Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::AddressSpaceAddress::registerDescriptor | ( | ) | const |
Return the underlying address.
Since the return value can be used in a Boolean context, this function can also serve as a predicate to test whether the address is in the specified form.
const Sawyer::Optional< Address > & Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::AddressSpaceAddress::concrete | ( | ) | const |
Return the underlying address.
Since the return value can be used in a Boolean context, this function can also serve as a predicate to test whether the address is in the specified form.
SValuePtr Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::AddressSpaceAddress::abstract | ( | ) | const |
Return the underlying address.
Since the return value can be used in a Boolean context, this function can also serve as a predicate to test whether the address is in the specified form.
Sawyer::Optional< Address > Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::AddressSpaceAddress::toConcrete | ( | ) | const |
Convert an address to a concrete value if possible.
If the address is already concrete, then that value is returned. If the address is a register descriptor, then the descriptor is converted to a byte offset. If the address is abstract then we try to convert it to an unsigned concrete value.
SValuePtr Rose::BinaryAnalysis::InstructionSemantics::BaseSemantics::AddressSpaceAddress::toAbstract | ( | RiscOperators & | addrOps | ) | const |
Convert an address to an abstract value if possible.
If the address is already abstract, then that value is returned. If the address is a register descriptor, then the descriptor is converted to a byte offset. If the address is concrete then an abstract address is created from it. If the address is empty or cannot be converted to an abstract value then null is returned.
The supplied address operators are used to perform any necessary arithmetic and construction of the return value. The returned value, if not null, is 64 bits in width by unsigned extension or truncation.