|
GTIRB
v2.3.1
GrammaTech Intermediate Representation for Binaries: C++ API
|
A special class to store an Effective Address. More...
#include <Addr.hpp>
Public Types | |
| typedef int64_t | difference_type |
| The type used to represent a difference between two Addr objects. More... | |
| typedef uint64_t | value_type |
| The underlying type used to represent an Addr object. More... | |
Public Member Functions | |
| constexpr | Addr () noexcept |
| Default constructor. More... | |
| constexpr | Addr (value_type X) noexcept |
Explicit conversion from value_type to Addr. More... | |
| constexpr | operator value_type () const noexcept |
Explicitly convert Addr to value_type. More... | |
| constexpr Addr | operator+ () const noexcept |
| Unary plus for Addr. This is a noop because Addr objects represent an unsigned address value. More... | |
| constexpr Addr & | operator++ () noexcept |
| Preincrement for Addr. More... | |
| constexpr Addr | operator++ (int) noexcept |
| Postincrement for Addr. More... | |
| constexpr Addr & | operator+= (value_type Offset) noexcept |
| Add-assign for Addr. More... | |
| constexpr Addr & | operator-- () noexcept |
| Predecrement for Addr. More... | |
| constexpr Addr | operator-- (int) noexcept |
| Postdecrement for Addr. More... | |
| constexpr Addr & | operator-= (value_type Offset) noexcept |
| Subtract-assign for Addr. More... | |
| constexpr Addr | operator~ () const noexcept |
| Unary complement for Addr. Flips the value of all bits in the address. More... | |
Friends | |
| constexpr friend bool | operator!= (const Addr &LHS, const Addr &RHS) noexcept |
| Inquality operator for Addr. More... | |
| constexpr friend Addr | operator+ (const Addr &A, value_type Offset) noexcept |
| Binary + operator for Addr + integral offset. More... | |
| constexpr friend Addr | operator+ (value_type Offset, const Addr &A) noexcept |
| Binary + operator for integral offset + Addr. More... | |
| constexpr friend difference_type | operator- (const Addr &A, const Addr &B) noexcept |
| Binary - operator for Addr - Addr. More... | |
| constexpr friend Addr | operator- (const Addr &A, value_type Offset) noexcept |
| Binary - operator for Addr - integral offset. More... | |
| constexpr friend bool | operator< (const Addr &LHS, const Addr &RHS) noexcept |
| Less-than operator for Addr. More... | |
| constexpr friend bool | operator<= (const Addr &LHS, const Addr &RHS) noexcept |
| Less-than-or-equal operator for Addr. More... | |
| constexpr friend bool | operator== (const Addr &LHS, const Addr &RHS) noexcept |
| Equality operator for Addr. More... | |
| constexpr friend bool | operator> (const Addr &LHS, const Addr &RHS) noexcept |
| Greater-than operator for Addr. More... | |
| constexpr friend bool | operator>= (const Addr &LHS, const Addr &RHS) noexcept |
| Greater-than-or-equal operator for Addr. More... | |
Related Functions | |
(Note that these are not member functions.) | |
| template<typename T > | |
| std::optional< Addr > | addressLimit (const T &Object) |
| Exclusive upper limit of an object's address range. More... | |
| template<typename T > | |
| std::optional< AddrRange > | addressRange (const T &Object) |
| Address range of an object. More... | |
| template<typename T > | |
| bool | containsAddr (const T &Object, Addr Ea) |
| Check: Does the specified object contain the specified address? More... | |
| template<typename CharT , typename Traits > | |
| std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &Stream, Addr A) |
| Writes an address to an output stream in hex. More... | |
| template<typename CharT , typename Traits > | |
| std::basic_ostream< CharT, Traits > & | operator<< (std::basic_ostream< CharT, Traits > &Stream, std::optional< Addr > A) |
| Writes an optional address to an output stream in hex. More... | |
A special class to store an Effective Address.
It is a thin wrapper around a uint64_t for 64-bit address storage. Its semantics in overflow situations are the same as semantics for unsigned integers.
An Addr cannot store a relative address as it cannot contain a negative number.
| typedef int64_t gtirb::Addr::difference_type |
The type used to represent a difference between two Addr objects.
| typedef uint64_t gtirb::Addr::value_type |
The underlying type used to represent an Addr object.
|
inlineconstexprnoexcept |
Default constructor.
|
inlineexplicitconstexprnoexcept |
Explicit conversion from value_type to Addr.
| X | The address. |
|
inlineexplicitconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
related |
|
related |
Address range of an object.
| T | Any type that specifies a range of addresses via getAddress() and getSize() methods (e.g., DataBlock). |
| Object | The object to interrogate. |
Object, or std::nullopt if the object's addresses are not defined.
|
related |
Check: Does the specified object contain the specified address?
| T | Any type that specifies a range of addresses via getAddress() and getSize() methods (e.g. DataBlock). |
| Object | The object of interest. |
| Ea | The address of interest. |
true if Ea is in the address range of Object, false otherwise. Inquality operator for Addr.
|
friend |
|
friend |
|
friend |
|
friend |
Less-than operator for Addr.
|
related |
Writes an address to an output stream in hex.
This is a convenience, since this seems to be the format that is most commonly used. Note that other formats can be used by casting the address to a uint64_t and setting the formatting explicilty.
| Stream | the stream to write to. |
| A | the address to write. |
|
related |
Less-than-or-equal operator for Addr.
Equality operator for Addr.
Greater-than operator for Addr.
Greater-than-or-equal operator for Addr.
1.8.17