| 1 |
#include "SimpleDebuggable.hh" |
| 2 |
|
| 3 |
#include "Debugger.hh" |
| 4 |
|
| 5 |
#include "MSXMotherBoard.hh" |
| 6 |
|
| 7 |
#include "unreachable.hh" |
| 8 |
|
| 9 |
namespace openmsx { |
| 10 |
|
| 11 |
SimpleDebuggable::SimpleDebuggable( |
| 12 |
MSXMotherBoard& motherBoard_, std::string name_, |
| 13 |
static_string_view description_, unsigned size_) |
| 14 |
: motherBoard(motherBoard_) |
| 15 |
, name(std::move(name_)) |
| 16 |
, description(description_) |
| 17 |
, size(size_) |
| 18 |
{ |
| 19 |
motherBoard.getDebugger().registerDebuggable(name, *this); |
| 20 |
} |
| 21 |
|
| 22 |
SimpleDebuggable::~SimpleDebuggable() |
| 23 |
{ |
| 24 |
motherBoard.getDebugger().unregisterDebuggable(name, *this); |
| 25 |
} |
| 26 |
|
| 27 |
unsigned SimpleDebuggable::getSize() const |
| 28 |
{ |
| 29 |
return size; |
| 30 |
} |
| 31 |
|
| 32 |
std::string_view SimpleDebuggable::getDescription() const |
| 33 |
{ |
| 34 |
return description; |
| 35 |
} |
| 36 |
|
| 37 |
byte SimpleDebuggable::read(unsigned address) |
| 38 |
{ |
| 39 |
return read(address, motherBoard.getCurrentTime()); |
| 40 |
} |
| 41 |
|
| 42 |
byte SimpleDebuggable::read(unsigned , EmuTime ) |
| 43 |
{ |
| 44 |
UNREACHABLE; |
| 45 |
} |
| 46 |
|
| 47 |
void SimpleDebuggable::write(unsigned address, byte value) |
| 48 |
{ |
| 49 |
write(address, value, motherBoard.getCurrentTime()); |
| 50 |
} |
| 51 |
|
| 52 |
void SimpleDebuggable::write(unsigned , byte , |
| 53 |
EmuTime ) |
| 54 |
{ |
| 55 |
|
| 56 |
} |
| 57 |
|
| 58 |
} |