projects
/
riscv-isa-sim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debug: Move things around, but addresses now conflict with ROM.
[riscv-isa-sim.git]
/
riscv
/
processor.cc
diff --git
a/riscv/processor.cc
b/riscv/processor.cc
index ef529fc20c1d6d885b2fc7b22abad7060302a68c..d6da193eba5baef80b0a56402507d8cc51243598 100644
(file)
--- a/
riscv/processor.cc
+++ b/
riscv/processor.cc
@@
-189,6
+189,7
@@
void processor_t::set_privilege(reg_t prv)
void processor_t::enter_debug_mode(uint8_t cause)
{
void processor_t::enter_debug_mode(uint8_t cause)
{
+ fprintf(stderr, "Entering debug mode because of cause %d", cause);
state.dcsr.cause = cause;
state.dcsr.prv = state.prv;
set_privilege(PRV_M);
state.dcsr.cause = cause;
state.dcsr.prv = state.prv;
set_privilege(PRV_M);
@@
-209,7
+210,9
@@
void processor_t::take_trap(trap_t& t, reg_t epc)
if (state.dcsr.cause) {
if (t.cause() == CAUSE_BREAKPOINT) {
state.pc = debug_rom_entry();
if (state.dcsr.cause) {
if (t.cause() == CAUSE_BREAKPOINT) {
state.pc = debug_rom_entry();
+ fprintf(stderr, "Breakpoint.");
} else {
} else {
+ fprintf(stderr, "WE ARE IN DEBUG MODE, DEBUG_ROM_EXCEPTION\n");
state.pc = DEBUG_ROM_EXCEPTION;
}
return;
state.pc = DEBUG_ROM_EXCEPTION;
}
return;