projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4e768d4
)
debug: Able to successfully examine a single hart.
author
Megan Wachs
<megan@sifive.com>
Tue, 18 Apr 2017 21:04:57 +0000
(14:04 -0700)
committer
Megan Wachs
<megan@sifive.com>
Tue, 18 Apr 2017 21:04:57 +0000
(14:04 -0700)
riscv/debug_module.cc
patch
|
blob
|
history
diff --git
a/riscv/debug_module.cc
b/riscv/debug_module.cc
index 62671f67a25c8cc6b343e109b0ea9f4ec3ce1f0b..533b959b9d3cf487b70910189f60482229185acc 100644
(file)
--- a/
riscv/debug_module.cc
+++ b/
riscv/debug_module.cc
@@
-126,7
+126,9
@@
bool debug_module_t::store(reg_t addr, size_t len, const uint8_t* bytes)
}
if (addr >= debug_progbuf_start && ((addr + len) <= (debug_progbuf_start + sizeof(program_buffer)))) {
}
if (addr >= debug_progbuf_start && ((addr + len) <= (debug_progbuf_start + sizeof(program_buffer)))) {
+ fprintf(stderr, "Successful write to program buffer %d bytes at %x\n", (int) len, (int) addr);
memcpy(program_buffer + addr - debug_progbuf_start, bytes, len);
memcpy(program_buffer + addr - debug_progbuf_start, bytes, len);
+
return true;
}
return true;
}
@@
-213,7
+215,7
@@
bool debug_module_t::dmi_read(unsigned address, uint32_t *value)
perform_abstract_command();
}
} else if (address >= DMI_PROGBUF0 && address < DMI_PROGBUF0 + progsize) {
perform_abstract_command();
}
} else if (address >= DMI_PROGBUF0 && address < DMI_PROGBUF0 + progsize) {
- unsigned i = address
=
DMI_PROGBUF0;
+ unsigned i = address
-
DMI_PROGBUF0;
result = read32(program_buffer, i);
if ((abstractauto.autoexecprogbuf >> i) & 1) {
perform_abstract_command();
result = read32(program_buffer, i);
if ((abstractauto.autoexecprogbuf >> i) & 1) {
perform_abstract_command();