srecord: srecord::memory_walker Class Reference

srecord 1.65.0

Loading...
Searching...
No Matches
srecord::memory_walker Class Referenceabstract

The srecord::memory_walker class is used to represent an abstract handler for the action to perform when walking a memory image. More...

`#include <walker.h>`

Inheritance diagram for srecord::memory_walker:
[legend]

## Public Types
typedef std::shared_ptr< memory_walker > | pointer

## Public Member Functions
virtual | ~memory_walker ()
| The destructor.
virtual void | observe (unsigned long address, const void *data, int data_size)=0
| The observe method is used by the memory walker to provide data.
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.
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.
virtual void | observe_header (const record *rec=0)
| The observe_header method is used to inform the walker of the header record.
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.

## Protected Member Functions
| memory_walker ()
| The default constructor.

## Detailed Description

The srecord::memory_walker class is used to represent an abstract handler for the action to perform when walking a memory image.

Definition at line 33 of file walker.h.

## Member Typedef Documentation

## ◆ pointer

typedef std::shared_ptr<memory_walker> srecord::memory_walker::pointer

Definition at line 36 of file walker.h.

## Constructor & Destructor Documentation

## ◆ ~memory_walker()

virtual srecord::memory_walker::~memory_walker | ( |  | ) |
| virtual

The destructor.

## ◆ memory_walker()

srecord::memory_walker::memory_walker | ( |  | ) |
| protected

The default constructor.

May only be called by derived classes.

References memory_walker().

Referenced by memory_walker().

## Member Function Documentation

## ◆ observe()

virtual void srecord::memory_walker::observe | ( | unsigned long | address,
|  | const void * | data,
|  | int | data_size )
| pure 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.

Parameters

  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.

Implemented in srecord::memory_walker_adler16, srecord::memory_walker_adler32, srecord::memory_walker_alignment, srecord::memory_walker_compare, srecord::memory_walker_continuity, srecord::memory_walker_crc16, srecord::memory_walker_crc32, srecord::memory_walker_fletcher16, srecord::memory_walker_fletcher32, srecord::memory_walker_gcrypt, srecord::memory_walker_stm32, and srecord::memory_walker_writer.

## ◆ observe_end()

virtual void srecord::memory_walker::observe_end | ( | void |  | ) |
| virtual

The observe_end method is called once all of the data blocks have been passed to the observer via the observe() method.

Reimplemented in srecord::memory_walker_alignment.

## ◆ notify_upper_bound()

virtual void srecord::memory_walker::notify_upper_bound | ( | unsigned long | address | ) |
| virtual

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.

Shall be called before the any observe calls are made. By default, nothing happens.

Parameters

  address | The address of the byte immediately beyond the used memory.

## ◆ observe_header()

virtual void srecord::memory_walker::observe_header | ( | const record * | rec = 0 | ) |
| virtual

The observe_header method is used to inform the walker of the header record.

The default does nothing.

Parameters

  rec | The record to be processed.

Reimplemented in srecord::memory_walker_writer.

## ◆ observe_start_address()

virtual void srecord::memory_walker::observe_start_address | ( | const record * | rec = 0 | ) |
| virtual

The observe_start_address method is used to inform the walker of the execution start address record.

The default does nothing.

Parameters

  rec | The record to be processed.

Reimplemented in srecord::memory_walker_writer.

The documentation for this class was generated from the following file:

- memory/walker.h