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

Debugger: Random feature ideas #2

Open
cfcs opened this issue Jul 14, 2019 · 3 comments
Open

Debugger: Random feature ideas #2

cfcs opened this issue Jul 14, 2019 · 3 comments

Comments

@cfcs
Copy link

cfcs commented Jul 14, 2019

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) or register y is (expression))
  • on-access breakpoints
  • memory views as separate boxes
@cfcs
Copy link
Author

cfcs commented Jul 14, 2019

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

@abbysmal
Copy link
Owner

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

@cfcs
Copy link
Author

cfcs commented Sep 10, 2019

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.

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

2 participants