🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Untitled

posted in DruinkJournal
Published October 27, 2006
Advertisement
Whee, the debugger is coming along nicely now. Plain blocking sockets are much nicer than IO completion ports and the like [smile]

When the VM runs with the DRUINKSCRIPT_DEBUGGER flag defined, then when it runs a script, it'll wait for a debugger to connect to it. I'll change this later, so it's optional (somehow).
The debugger, when attached gets notified when a function runs (Which will be immediately after connecting, and any subsequent times), and the debugger can then request symbols (The compiled script file, essentially) from the VM. The debugger will cache these, so the whole script, list of strings and functions and so on don't need to be sent each time a function from that script is run.

This part isn't implemented yet, but it's just a braindump for what will happen:
From then on, the debugger will run its own local version of the script alongside the script. When a breakpoint is set, the script notifies the debugger, and it also notes the position of it locally. When a breakpoint is hit (Single stepping just sets an implicit breakpoint on the next instruction), the script notifies the debugger, and then blocks, waiting for permission to continue execution. The debugger at this stage can send the script information about changed registers, stack variables, etc.
I'm not sure if I'll do edit and continue, or "skipping" of instructions yet, but it should be pretty easy to do the latter.

That's about it for now I suppose. I'm hungry. Lunch time...
Previous Entry Untitled
Next Entry Untitled
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement
Advertisement