Browse Source

Merge pull request #1595 from Siudya/until-paddr

Interaction: Support until-mem operation on physical memory space
pull/1560/head
Andrew Waterman 2 years ago
committed by GitHub
parent
commit
3192ee4d31
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      riscv/interactive.cc

6
riscv/interactive.cc

@ -721,7 +721,7 @@ void sim_t::interactive_until(const std::string& cmd, const std::vector<std::str
if (args.size() < 3)
throw trap_interactive();
if (args.size() == 3)
if (args.size() == 4 || (args[0] == "pc" && args.size() == 3)) //dont check mem with arg len = 3
get_core(args[1]); // make sure that argument is a valid core number
char *end;
@ -732,7 +732,9 @@ void sim_t::interactive_until(const std::string& cmd, const std::vector<std::str
throw trap_interactive();
// mask bits above max_xlen
int max_xlen = procs[strtol(args[1].c_str(),NULL,10)]->get_isa().get_max_xlen();
bool until_mem_paddr = args[0] == "mem" && args.size() == 3;
size_t procnum = until_mem_paddr ? 0 : strtol(args[1].c_str(), NULL, 10);
int max_xlen = procs[procnum]->get_isa().get_max_xlen();
if (max_xlen == 32) val &= 0xFFFFFFFF;
std::vector<std::string> args2;

Loading…
Cancel
Save