Goodboy
Goodboy copied to clipboard
Debugger: Random feature ideas
I found this random list of ideas in a file called ENGIL-GAMEBOY.TXT. Thought it would make more sense to store it here: :)
- speculative execution for RETs
- "hotness" coloring for instructions and/or heap based on how often/recently accessed or executed or modified
- conditional breakpoints (when
x address is (expression)orregister y is (expression)) - on-access breakpoints
- memory views as separate boxes
I think the idea for the speculative execution was that given a RET or conditional branch you could present a graph of the next 1/2/3 subroutines and the register values they depended on.
Something like
.PRINT
; put some pixels on the screen
RET
.MAYBE-DEAD:
test %myhitpoints ; when hovering over this, present to the user that this determines where we go to .DEAD or .BARELY-DEAD next
jump-if-zero .DEAD ; when breaking here, let user know it will jump to .DEAD -> .PRINT -> .MAYBE-DEAD -> BARELY-DEAD
jump .BARELY-DEAD
.DEAD
test %playing-on-easy-mode
jmp-if-zero .GAME-OVER
push $"the magic fairy gave you back some hitpoints"
CALL .PRINT
jmp .BARELY-DEAD
.BARELY-DEAD
push $"you are low on hitpoints"
CALL .PRINT
RET
Hey! Sorry for the late reply!
Yes I remember this! Thank you for posting this, I had a text file lurking somewhere as well from this conversation we had. :) Conditional breakpoints I do have a branch somewhere, but it's unsatisfactory, may rewrite these one day. (the whole breakpoint logic is unsatisfactory in the first place, I need to improve this.)
Speculative execution sounds pretty cool but that's a subject I need to read more about. I'm sort of unsure about how this ties up with the various clocks and the GPU overall and how to design it in an efficient way. I will try to find some material, but if you do have some I'll gladly take it. :)
Anyway, thanks again for your message! I hope I'll find some time to work on it soon enough. :) Cheers
I don't know if that's the right word for it, I just thought it would be cool if the debugger could "execute multiple branches ahead of time" and report the results/side-effects back. With a purely functional state machine for the debugger that seems doable, especially since the memory space of the GB is so small.