PStack
2.0
Stack trace printer for MSVC and GCC binaries
|
Iterator type for COFF-format debugging symbols. More...
#include <image_symbol_iterator.hpp>
Construction / Destruction | |
image_symbol_iterator (psystem::address_t const in_ptr) noexcept | |
Construct an iterator based on a backing store. More... | |
image_symbol_iterator (image_symbol_iterator const &o) noexcept | |
Copy another iterator's state into this one. More... | |
~image_symbol_iterator () noexcept | |
Destroy this iterator instance. More... | |
image_symbol_iterator & | operator= (image_symbol_iterator const &o) noexcept |
Assign a new state to this instance. More... | |
Basic Iterator Interface | |
bool | operator== (image_symbol_iterator const &other) const noexcept |
Determine the equality of two instances. More... | |
bool | operator!= (image_symbol_iterator const &other) const noexcept |
Determine the inequality of two instances. More... | |
bool | operator< (image_symbol_iterator const &o) const noexcept |
Determines if this is less-than another instance. More... | |
bool | operator<= (image_symbol_iterator const &o) const noexcept |
Determines if this is less-than or equal-to another instance. More... | |
bool | operator> (image_symbol_iterator const &o) const noexcept |
Determines if this is greater-than another instance. More... | |
bool | operator>= (image_symbol_iterator const &o) const noexcept |
Determines if this is greater-than another or equal-to instance. More... | |
reference | operator* () const noexcept |
Access the underlying container data as a reference type. More... | |
pointer | operator-> () const noexcept |
Access to member data in the underlying container data. More... | |
void | swap (image_symbol_iterator &o) noexcept |
Swap the contents of another iterator with this instance. More... | |
Random Access Iterator Interface | |
reference | operator[] (size_t const count) const noexcept |
Access underlying container data by index. More... | |
image_symbol_iterator | operator++ (int) noexcept |
Postfix increment. More... | |
image_symbol_iterator & | operator++ () noexcept |
Prefix increment. More... | |
image_symbol_iterator & | operator+= (size_t const count) noexcept |
Compound addition. More... | |
image_symbol_iterator | operator-- (int) noexcept |
Postfix decrement. More... | |
image_symbol_iterator & | operator-- () noexcept |
Prefix decrement. More... | |
image_symbol_iterator & | operator-= (size_t const count) noexcept |
Compound subtraction. More... | |
image_symbol_iterator | operator- (size_t const count) const noexcept |
Create a new iterator placed prior to this instance in the container. More... | |
difference_type | operator- (image_symbol_iterator const &it) const noexcept |
Determine the distance between two iterators. More... | |
Member Data | |
IMAGE_SYMBOL const * | m_current_symbol |
The COFF debugging symbol currently examined by this instance. | |
Iterator type for COFF-format debugging symbols.
COFF images often maintain a section of the file dedicated to debugging symbols. The Win32 type, IMAGE_SYMBOL
exposes this information, and that is the type that this iterator examines.
operator-
as a member function, operator+
is a free-function to allow "4 + it" and "it + 4". While "it - 4" makes sense, "4 - it" is meaningless. Also, while "it1 - it2" is a reasonable offset computation, "it1 + it2" is meaningless.
|
explicitnoexcept |
Construct an iterator based on a backing store.
This constructor copies only one pointer, but the data backing this pointer must outlive the iteration.
[in] | in_ptr | I intended the iterator to be backed by a memory-mapped COFF image, so the input is a binary blob that we know points to the debugging symbols. This should be a contiguous array of IMAGE_SYMBOL structures. The constructor has no way to validate the real type of the data passed to it, so take care. |
|
noexcept |
Copy another iterator's state into this one.
[in] | o | The other iterator instance from which to transfer data. |
|
noexcept |
Destroy this iterator instance.
|
noexcept |
Determine the inequality of two instances.
[in] | other | The instance to compare against this for non-equivalence. |
false
if both this
and other
examine the same location in the same container; true
in all other cases.
|
noexcept |
Access the underlying container data as a reference type.
IMAGE_SYMBOL
in the container across which this instance iterates.
|
noexcept |
Postfix increment.
Make a copy of the current iterator, increment this
, then return the copy.
|
noexcept |
Prefix increment.
Simply advance the iterator to the next position.
|
noexcept |
Compound addition.
[in] | count | The number of positions to advance the iterator. |
|
noexcept |
Create a new iterator placed prior to this instance in the container.
[in] | count | The number of positions to decrease the resulting iterator relative to this one. |
|
noexcept |
Determine the distance between two iterators.
[in] | it | The iterator against which this will be compared. |
it
is behind this
. This value is negative if this
is closer to the beginning of the container than it
.
|
noexcept |
Postfix decrement.
Make a copy of the current iterator, decrement this
, then return the copy.
|
noexcept |
Prefix decrement.
Simply move the iterator to the prior position.
|
noexcept |
Compound subtraction.
[in] | count | The number of positions to decrease the iterator. |
|
noexcept |
Access to member data in the underlying container data.
IMAGE_SYMBOL
through a const pointer.
|
noexcept |
Determines if this
is less-than another instance.
[in] | o | The other iterator instance to compare against this . |
true
if this
is closer to the beginning of the container than o
.
|
noexcept |
Determines if this
is less-than or equal-to another instance.
[in] | o | The other iterator instance to compare against this . |
true
if this
is closer to the beginning of the container than o
, or if they are equal.
|
noexcept |
Assign a new state to this instance.
[in] | o | The other iterator instance from which to transfer state. |
|
noexcept |
Determine the equality of two instances.
[in] | other | The instance to compare against this for equivalence. |
true
if both this
and other
examine the same location in the same container; false
in all other cases.
|
noexcept |
Determines if this
is greater-than another instance.
[in] | o | The other iterator instance to compare against this . |
true
if this
is farther from the beginning of the container than o
.
|
noexcept |
Determines if this
is greater-than another or equal-to instance.
[in] | o | The other iterator instance to compare against this . |
true
if this
is farther from the beginning of the container than o
, or if they are equal.
|
noexcept |
Access underlying container data by index.
This is an "offset" dereference operator. This means that this
[0] is equivalent to *this
, this
[3] is equivalent to *
(this+3), and so on.
[in] | count | The offset from this current iterator's position. |
IMAGE_SYMBOL
.
|
noexcept |
Swap the contents of another iterator with this instance.
This swaps the contents of the iterators (not the contents of the data being iterated across).
[in] | o | The other iterator instance that will swap with this . |