Files
openide/plugins/kotlin/jvm-debugger/coroutines
Nikita Bobko ab0fa50fcd Replace 'kotlinc.kotlin-compiler' project library with 'kotlinc-delegator.kotlin-compiler' module delegator
This commit is part of series of project model refactoring commits, look at neighborhood commits.
Check out last commits in this sequence.

These commit are done for sake of unification and making it easier to write cooperative compilation
prototype.

GitOrigin-RevId: 341fbb8bc02ad28a7e2113b859fba87756af5c37
2020-11-16 14:55:20 +03:00
..

Coroutine Debugger support

Java thread stack with coroutine information

  1. Real frames
  2. Coroutine 'preflight' frame: SuspendExitMode is SUSPEND_LAMBDA or SUSPEND_METHOD_PARAMETER. Location.isPreflight
  3. One or more frames (skipped in debugger)
  4. Coroutine 'starting' frame: SuspendExitMode SUSPEND_METHOD frame
  5. Restored from coroutine information frames
  6. Real frames after the 'starting' frame
  7. Creation frames (only exists if coroutine agent enabled)

Debugger interface

Debugger works as a combination of PositionManager and AsyncStackTraceProvider. Once the 'preflight' signature frame found PositionManager forms a 'preflight' frame with coroutine information which gets processed with AsyncStackTraceProvider.