Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command-line debugger capabilities #5

Open
9 tasks
jeremyBanks opened this issue Jun 10, 2018 · 1 comment
Open
9 tasks

Command-line debugger capabilities #5

jeremyBanks opened this issue Jun 10, 2018 · 1 comment

Comments

@jeremyBanks
Copy link
Owner

We aren't have a fully-featured debugger, but we should add a few initial debugging features to our interpreter.

Currently, once per second we print the latest N (100?) instructions that we've executed, including their opcodes, addresses, clock time, and some debug info about what they modified. We throttle our execution so it doesn't exceed real-time, but aside from that we just run undisturbed until we hit a panic.

We should allow you to run in --debugger mode where you have commands like:

  • next $N=1: Run next $N instructions.
  • until $T: Run until clock time >= T.
  • to $A: Run until instruction pointer equals $A.
  • resume: Run forever.
  • log: Displays the latest 20(?) instructions, and the next 8 bytes from the instruction pointer.
  • registers: Show all registers.
  • memory $N: Show value in memory at address $N.
  • read $A: Displays the value in memory at address $A.

To make this most useful, we also need to:

  • Update all methods that can panic so they instead return Results. If they return an Err, they must make sure to have had no side effects, so we can (if appropriate) bring up the debugger instead of aborting the program.
@jeremyBanks jeremyBanks changed the title Debugger capabilities Command-line debugger capabilities Jun 10, 2018
@jeremyBanks
Copy link
Owner Author

If we decided to implement some of these from the Web UI first, that's still good. It might be nice to step forward by frames...

  • next vlbank

...while using the graphics debug panes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant