Questions on new Debugger API

Stefan Marr java at
Mon Sep 5 18:03:54 UTC 2016


I started to look at the new Debugger API introduced in Truffle 0.17.

I am a little unsure about how it is intended to be used.

Should I request a DebuggerSession as late or as early as possible?

The JavaDoc mentions that it is possible to have multiple sessions, which I assume, I can use to handle different entities actors/threads/what-ever separately from each other.

Let’s assume an actor-based language, and that I got a debugger, which allows me to set line breakpoints (without any qualification/scoping). The intended breakpoint behavior here is that all actors executing that line are supposed to stop.
To realize that, should I have one global session on which I register the breakpoint?

I am not really sure how the debugger sessions are mapped to execution entities either. So, how do I ’scope’ a session?
Or should I create a session for each actor, probably when I instantiate the actor?

And then the next step would be to have breakpoints local to an actor. For guess, I’d need to create a separate session, and then set the breakpoint there. However, I still haven’t seen how I could make sure the mapping between execution and actor could be done, especially since a single actor can over time be scheduled on different threads (in a pool).

Thanks for any comments

Stefan Marr
Johannes Kepler Universität Linz

More information about the graal-dev mailing list