Return success on writes to abstractauto
authorTim Newsome <tim@sifive.com>
Fri, 9 Jun 2017 17:00:36 +0000 (10:00 -0700)
committerTim Newsome <tim@sifive.com>
Fri, 9 Jun 2017 17:00:36 +0000 (10:00 -0700)
This bug was exposed by newer OpenOCD which actually checks the result.

riscv/debug_module.cc

index db035e3313d42d2cf0d4b1386c44cc815fa1911f..079ebd43a2d8b4facbac28df5eed03850c7bd548 100644 (file)
@@ -463,9 +463,11 @@ bool debug_module_t::dmi_write(unsigned address, uint32_t value)
         return true;
 
       case DMI_ABSTRACTAUTO:
-        abstractauto.autoexecprogbuf = get_field(value, DMI_ABSTRACTAUTO_AUTOEXECPROGBUF);
-        abstractauto.autoexecdata = get_field(value, DMI_ABSTRACTAUTO_AUTOEXECDATA);
-        break;
+        abstractauto.autoexecprogbuf = get_field(value,
+            DMI_ABSTRACTAUTO_AUTOEXECPROGBUF);
+        abstractauto.autoexecdata = get_field(value,
+            DMI_ABSTRACTAUTO_AUTOEXECDATA);
+        return true;
     }
   }
   return false;