20 #ifndef SRECORD_MEMORY_H
21 #define SRECORD_MEMORY_H
70 void set(
unsigned long address,
int value);
83 int get(
unsigned long address)
const;
94 bool set_p(
unsigned long address)
const;
153 size_t &nbytes)
const;
231 return (nchunks == 0);
245 mutable int nchunks_max;
283 mutable int find_next_chunk_index;
298 record *execution_start_address;
310 void copy(
const memory &src);
The srecord::memory_chunk class is used to represent portion of memory.
std::shared_ptr< memory_walker > pointer
The srecord::memory class is used to simulate memory contents.
void set_execution_start_address(unsigned long value)
The set_execution_start_address method may be used to set the execution start address record.
static bool compare(const memory &, const memory &)
The compare method may be used to determine if two memory instances are equal.
unsigned long get_upper_bound() const
The get_upper_bound method is used to obtain the upper bound (maximum address plus one) of the memory...
bool empty(void) const
The empty method is used to determine whether or not this memory image has no data in it.
int get(unsigned long address) const
The get method is used to fetch the value of the byte at the given 'address'.
record * get_header(void) const
The get_header method is used to determine the value of the header record set by either the reader() ...
memory(const memory &)
The copy constructor.
void set_header(const std::string &value)
The set_header method may be used to set the header command.
bool is_well_aligned(unsigned multiple) const
The is_well_aligned method is used to test whether or not all of the data in the memory buffer is wel...
void walk(memory_walker::pointer) const
The walk method is used to apply a memory_walker derived class to every byte of memory.
memory()
The default constructor.
static bool equal(const memory &, const memory &)
The equal method may be used to determine if two memory instances are equal.
record * get_execution_start_address(void) const
The get_execution_start_address method is used to determine the value of the execution start address ...
memory & operator=(const memory &)
The assignment operator.
void set(unsigned long address, int value)
The set method is used to set the byte at the given ‘address’ to the given ‘value’.
bool find_next_data(unsigned long &address, void *data, size_t &nbytes) const
The find_next_data method may be used to locate data at or following the ‘address’ given.
void reader(const input::pointer &input, defcon_t redundant_bytes, defcon_t contradictory_bytes)
The reader method is used to read the given ‘input’ source into memory.
bool set_p(unsigned long address) const
The set_p method is used to determine whether the byte at the given address has been set() yet.
bool has_holes(void) const
The has_holes method may be used to determine whether or not the memory data has "holes" in it.
unsigned long get_lower_bound() const
The get_lower_bound method is used to obtain the lower bound (lowest address) of the memory image.
The srecord::record class is used to represent a data record read from a file.
bool operator!=(const srecord::memory &, const srecord::memory &)
The inequality operator.
bool operator==(const srecord::memory &, const srecord::memory &)
The equality operator.