Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    423620

Untitled

Sign in to follow this  
Evil Steve

82 views

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...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!