Supporting inline types in Java debugger

Frederic Parain frederic.parain at
Thu Oct 3 12:51:04 UTC 2019


Here’s a patch to enable Java debugging with inline types:

Using jdb, it enables the following operations:
  - inspection of inline classes
  - read/write operations on local variables containing inline values
  - read/write operations on flattened fields
  - read/write operations on flattened arrays

Those changes are relatively limited, but they impact all layers of
the JPDA: JDI, JDWP, JVMTI and JNI. Several of these changes will require
some spec updates. They also highlight some future issues with current
API (like com.sun.jdi.VirtualMachine.classesByName(String className)
which takes a class name to convert it into a L-type before sending
the request to the debuggee).

Debugging has been tested with jdb.
Other Java debugger are not guaranteed to work, for instance IntelliJ Idea
debugger still gets confused with Q-signatures.

We can decide to either push this code if people are interested in using Java
debuggers with inline types, or keep it has an exploration result that we can
exploit when finalizing inline types support for the whole Java platform.



More information about the valhalla-dev mailing list