You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
jeremyBanks
changed the title
Debugger capabilities
Command-line debugger capabilities
Jun 10, 2018
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:
Result
s. If they return anErr
, they must make sure to have had no side effects, so we can (if appropriate) bring up the debugger instead of aborting the program.The text was updated successfully, but these errors were encountered: