My Project
Public Member Functions | Public Attributes | List of all members
VarnodeData Struct Reference

Data defining a specific memory location. More...

#include <pcoderaw.hh>

Collaboration diagram for VarnodeData:
Collaboration graph
[legend]

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...
 
void restoreXml (const Element *el, const AddrSpaceManager *manage)
 Recover this object from an XML tag. More...
 
bool contains (const VarnodeData &op2) const
 Does this container another given VarnodeData. More...
 

Public Attributes

AddrSpacespace
 The address space.
 
uintb offset
 The offset within the space.
 
uint4 size
 The number of bytes in the location.
 

Detailed Description

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.

Member Function Documentation

◆ contains()

bool 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

Parameters
op2is the other VarnodeData to test for containment
Returns
true if this contains the other

◆ getAddr()

Address VarnodeData::getAddr ( void  ) const
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

Returns
the address of the varnode

◆ operator!=()

bool VarnodeData::operator!= ( const VarnodeData op2) const
inline

Compare for inequality.

Compare VarnodeData for inequality. If either the space, offset, or size is not equal, return true.

Parameters
op2is the object being compared to
Returns
true if this is not equal to op2

◆ operator<()

bool VarnodeData::operator< ( const VarnodeData op2) const
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.

Parameters
op2is the object being compared to
Returns
true if this is less than op2

◆ operator==()

bool VarnodeData::operator== ( const VarnodeData op2) const
inline

Compare for equality.

Compare VarnodeData for equality. The space, offset, and size must all be exactly equal

Parameters
op2is the object being compared to
Returns
true if this is equal to op2

◆ restoreXml()

void VarnodeData::restoreXml ( const Element el,
const AddrSpaceManager manage 
)

Recover this object from an XML tag.

Build this VarnodeData from an <addr> tag

Parameters
elis the parsed tag
manageis the address space manager

The documentation for this struct was generated from the following files: