srecord
1.65.0
|
The srecord::memory_walker_compare class is used to represent a memory walker which compares memory data with another memory instance. More...
#include <compare.h>
Public Types | |
typedef std::shared_ptr< memory_walker_compare > | pointer |
![]() | |
typedef std::shared_ptr< memory_walker > | pointer |
Public Member Functions | |
virtual | ~memory_walker_compare () |
The destructor. More... | |
virtual void | observe (unsigned long, const void *, int) |
The observe method is used by the memory walker to provide data. More... | |
void | print (const char *caption) const |
The print method is used to print the results of the comparison on the standard output. More... | |
bool | same () const |
The same method is used to discover whether the result of the comparison indicate that the two memory instances are the same. More... | |
![]() | |
virtual | ~memory_walker () |
The destructor. More... | |
virtual void | observe_end (void) |
The observe_end method is called once all of the data blocks have been passed to the observer via the observe() method. More... | |
virtual void | notify_upper_bound (unsigned long address) |
The notify_upper_bound method is used to notify the walker of the upper bound (highest address plus one) of the observe calls to come. More... | |
virtual void | observe_header (const record *rec=0) |
The observe_header method is used to inform the walker of the header record. More... | |
virtual void | observe_start_address (const record *rec=0) |
The observe_start_address method is used to inform the walker of the execution start address record. More... | |
Static Public Member Functions | |
static pointer | create (const memory &other, bool check_wrong) |
The create class method is used to create new dynamically allocated instances of this class. More... | |
Additional Inherited Members | |
![]() | |
memory_walker () | |
The default constructor. More... | |
The srecord::memory_walker_compare class is used to represent a memory walker which compares memory data with another memory instance.
Note that this is strictly an improper subset comparison. I.e. that all bytes passed to the observe method exists in the other memory instance.
For a complete equality test, you need to use this comparison both ways round.
typedef std::shared_ptr<memory_walker_compare> srecord::memory_walker_compare::pointer |
|
virtual |
The destructor.
|
static |
The create class method is used to create new dynamically allocated instances of this class.
other | The other memory instance to be checked against this one. |
check_wrong | Whether or not to check that the data agrees as well as the address ranges. |
|
virtual |
The observe method is used by the memory walker to provide data.
Derived classes are required to impliment this method, and do something with the data.
address | The base address of this chunk of memory. |
data | The base address of this chunk of memory in memory. |
data_size | The size, in bytes, of this chunk of memory. |
Implements srecord::memory_walker.
void srecord::memory_walker_compare::print | ( | const char * | caption | ) | const |
The print method is used to print the results of the comparison on the standard output.
caption | The text to place at the start of the listing. |
bool srecord::memory_walker_compare::same | ( | ) | const |
The same method is used to discover whether the result of the comparison indicate that the two memory instances are the same.