Closed klanmiko closed 4 years ago
This is awesome! Could you please update the single-stepper documentation with how to use this new feature?
I've updated the documentation and merged in Kevin's changes
Can you rebase this on top of master? I prefer rebases to merges :).
I tried doing it myself, but when I did the 'display" command didn't work.
See https://github.com/jlpteaching/dinocpu/tree/klanmiko-singlestep-enhance for what I tried :)
I've hammered away the merge commit with a rebase.
It looked like your rebase should have worked. The display command returns silently if there was no error, and will print the value on the next step. Idk if this should be mentioned in the documentation?
Thanks!
Use case: While stepping through programs on the dinocpu, it is helpful to know the instruction at pc. Usually a user would call
print inst
. However, this would have to be called after every step. GDB and most debuggers have a display function that stores a list of expressions to print after every step.The goal of this PR is to add display functionality to the single-stepper.
doDisplay
is run after each successful step, and there is adisplayList: ArrayBuffer[Array[String]]
in main that stores all the commands to display, directly from input.displayCommandOkay
is used as an input validation guard in the command pattern matching part of main.