Skip to content

Commit

Permalink
Removed assertion with warning on debugger access of unmapped memory
Browse files Browse the repository at this point in the history
Regards #9
  • Loading branch information
Cirromulus committed Feb 25, 2021
1 parent be40c19 commit 535ea2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vp/src/core/common/debug_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ std::string DebugMemoryInterface::read_memory(uint64_t start, unsigned nbytes) {
std::vector<uint8_t> buf(nbytes); // NOTE: every element is zero-initialized by default

unsigned nbytes_read = _do_dbg_transaction(tlm::TLM_READ_COMMAND, start, buf.data(), buf.size());
assert(nbytes_read == nbytes && "not all bytes read");
if(nbytes_read < nbytes) {
std::cerr << "DebugMemoryInterface::read_memory: not all bytes read."
"Mostly this is caused by reading unmapped memory location."
<< std::endl;
}

std::stringstream stream;
stream << std::setfill('0') << std::hex;
Expand Down

0 comments on commit 535ea2f

Please sign in to comment.