srecord  1.65.0
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:

Public Types

typedef std::shared_ptr< memory_walkerpointer
 

Public Member Functions

virtual ~memory_walker ()
 The destructor. More...
 
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. 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...
 

Protected Member Functions

 memory_walker ()
 The default constructor. More...
 

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

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.

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
addressThe base address of this chunk of memory.
dataThe base address of this chunk of memory in memory.
data_sizeThe size, in bytes, of this chunk of memory.

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

◆ 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
addressThe 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
recThe 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
recThe record to be processed.

Reimplemented in srecord::memory_walker_writer.


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