Stack traces now list addresses in addition to function names.
Additionally, debugger stack traces number each frame, and the numbers
can be used together with the PRINT-LOCALS function to print the values
of local variables for any frame on the stack.
This is implemented by inserting special opcodes into the game's code.
When the breakpoint handler is finished, it returns the original opcode
so that execute_instruction can continue executing normally.
E.g.
* start xsystem4 with --debug option to drop into debugger immediately
* run (bp "game_main")
* ^d or \exit to close debugger REPL
* ...drop into a debugger REPL again at the game_main function
If Chibi-Scheme is installed, enable a debugger which can be used to
inspect the state of the VM when an error occurs.
So far only supports printing local/global variables. E.g.
dbg> (print-variable "g_theSactMenu")
...
dbg> (print-locals)
...