gdb can attach and read the PC:
[riscv-isa-sim.git] / riscv / execute.cc
index ae4c9597a1bd00af5b9ecfd992c470c807659d66..a1c22292a410774a9ae06a11f66c0e16dff9bcd6 100644 (file)
@@ -63,7 +63,7 @@ void processor_t::step(size_t n)
   if (state.dcsr.cause != DCSR_CAUSE_NONE) {
     // In Debug Mode, just do 10 steps at a time. Otherwise we're going to be
     // spinning the rest of the time anyway.
-    n = std::max(n, (size_t) 10);
+    n = std::min(n, (size_t) 10);
   }
 
   while (n > 0) {