decompiler
1.0.0
|
Data defining a specific memory location. More...
#include <pcoderaw.hh>
Public Member Functions | |
bool | operator< (const VarnodeData &op2) const |
An ordering for VarnodeData. More... | |
bool | operator== (const VarnodeData &op2) const |
Compare for equality. More... | |
bool | operator!= (const VarnodeData &op2) const |
Compare for inequality. More... | |
Address | getAddr (void) const |
Get the location of the varnode as an address. More... | |
AddrSpace * | getSpaceFromConst (void) const |
Treat this as a constant and recover encoded address space. More... | |
void | decode (Decoder &decoder) |
Recover this object from a stream. More... | |
void | decodeFromAttributes (Decoder &decoder) |
Recover this object from attributes of the current open element. More... | |
bool | contains (const VarnodeData &op2) const |
Does this container another given VarnodeData. More... | |
Public Attributes | |
AddrSpace * | space |
The address space. | |
uintb | offset |
The offset within the space. | |
uint4 | size |
The number of bytes in the location. | |
Data defining a specific memory location.
Within the decompiler's model of a processor, any register, memory location, or other variable can always be represented as an address space, an offset within the space, and the size of the sequence of bytes. This is more commonly referred to as a Varnode, but this is a bare-bones container for the data that doesn't have the cached attributes and the dataflow links of the Varnode within its syntax tree.
bool ghidra::VarnodeData::contains | ( | const VarnodeData & | op2 | ) | const |
Does this container another given VarnodeData.
Return true, if this, as an address range, contains the other address range
op2 | is the other VarnodeData to test for containment |
void ghidra::VarnodeData::decode | ( | Decoder & | decoder | ) |
Recover this object from a stream.
Build this VarnodeData from an <addr>, <register>, or <varnode> element.
decoder | is the stream decoder |
References ghidra::Decoder::closeElement(), decodeFromAttributes(), and ghidra::Decoder::openElement().
Referenced by ghidra::Address::decode(), ghidra::PcodeOpRaw::decode(), and ghidra::Architecture::decodeIncidentalCopy().
void ghidra::VarnodeData::decodeFromAttributes | ( | Decoder & | decoder | ) |
Recover this object from attributes of the current open element.
Collect attributes for the VarnodeData possibly from amidst other attributes
decoder | is the stream decoder |
References ghidra::AddrSpace::decodeAttributes(), ghidra::Decoder::getAddrSpaceManager(), ghidra::AddrSpaceManager::getDefaultCodeSpace(), ghidra::Decoder::getNextAttributeId(), ghidra::Translate::getRegister(), ghidra::AddrSpace::getTrans(), offset, ghidra::Decoder::readSpace(), ghidra::Decoder::readString(), ghidra::Decoder::rewindAttributes(), size, and space.
Referenced by decode(), ghidra::LanedRegister::decode(), ghidra::ContextInternal::decode(), ghidra::JumpBasicOverride::decode(), and ghidra::Database::decode().
|
inline |
Get the location of the varnode as an address.
This is a convenience function to construct a full Address from the VarnodeData's address space and offset
Referenced by ghidra::ActionLikelyTrash::apply(), ghidra::ActionUnjustifiedParams::apply(), ghidra::AddrSpaceManager::constructFloatExtensionAddress(), ghidra::AddrSpaceManager::constructJoinAddress(), ghidra::ContextInternal::decode(), ghidra::JumpBasicOverride::decode(), ghidra::Database::decode(), ghidra::EmulatePcodeCache::executeBranch(), ghidra::ActionPrototypeTypes::extendInput(), ghidra::ActionFuncLink::funcLinkOutput(), and ghidra::ParamEntry::justifiedContain().
|
inline |
|
inline |
Compare for inequality.
Compare VarnodeData for inequality. If either the space, offset, or size is not equal, return true.
op2 | is the object being compared to |
|
inline |
An ordering for VarnodeData.
VarnodeData can be sorted in terms of the space its in (the space's index), the offset within the space, and finally by the size.
op2 | is the object being compared to |
References ghidra::AddrSpace::getIndex(), offset, size, and space.
|
inline |
Compare for equality.
Compare VarnodeData for equality. The space, offset, and size must all be exactly equal
op2 | is the object being compared to |