Browse Source

debug: Remove debug_module_t::add_device, its redundant

pull/1374/head
Jerry Zhao 3 years ago
parent
commit
b87c6e64d0
  1. 4
      riscv/debug_module.cc
  2. 2
      riscv/debug_module.h
  3. 2
      riscv/sim.cc

4
riscv/debug_module.cc

@ -118,10 +118,6 @@ void debug_module_t::reset()
challenge = random();
}
void debug_module_t::add_device(bus_t *bus) {
bus->add_device(DEBUG_START, this);
}
bool debug_module_t::load(reg_t addr, size_t len, uint8_t* bytes)
{
addr = DEBUG_START + addr;

2
riscv/debug_module.h

@ -113,8 +113,6 @@ class debug_module_t : public abstract_device_t
debug_module_t(simif_t *sim, const debug_module_config_t &config);
~debug_module_t();
void add_device(bus_t *bus);
bool load(reg_t addr, size_t len, uint8_t* bytes);
bool store(reg_t addr, size_t len, const uint8_t* bytes);

2
riscv/sim.cc

@ -69,7 +69,7 @@ sim_t::sim_t(const cfg_t *cfg, bool halted,
for (auto& x : mems)
bus.add_device(x.first, x.second);
debug_module.add_device(&bus);
bus.add_device(DEBUG_START, &debug_module);
socketif = NULL;
#ifdef HAVE_BOOST_ASIO

Loading…
Cancel
Save