notes on using debug mode
authorScott Beamer <sbeamer@eecs.berkeley.edu>
Tue, 15 Jul 2014 17:50:22 +0000 (10:50 -0700)
committerScott Beamer <sbeamer@eecs.berkeley.edu>
Tue, 15 Jul 2014 17:50:22 +0000 (10:50 -0700)
README

diff --git a/README b/README
index ad9a25a84a149d890cf77bf28cd14d2174bc9494..fed9bc75e793f8a612896175b58c21051990cf69 100644 (file)
--- a/README
+++ b/README
@@ -54,3 +54,33 @@ Adding an instruction to the simulator requires two steps:
       % make install
 
   3. Rebuild the simulator.
+
+--------------------------------------------------------------------------
+Interactive Debug Mode
+--------------------------------------------------------------------------
+
+To invoke interactive debug mode, launch spike with -d:
+
+ % spike -d pk hello
+
+To see the contents of a register (0 is for core 0):
+
+ : reg 0 14
+
+To see the contents of a memory location (physical address in hex):
+
+ : mem 2020
+
+To see the contents of memory with a virtual address (0 for core 0):
+
+ : mem 0 2020
+
+You can advance by one instruction by pressing <enter>. You can also
+execute until a desired equality is reached:
+
+ : until pc 0 2020                   (stop when pc=2020)
+ : until mem 2020 50a9907311096993   (stop when mem[2020]=50a9907311096993)
+
+Alternatively, you can execute as long as an equality is true:
+
+ : while mem 2020 50a9907311096993