||No way to represent Java bytecode index in source information
||Jini Susan George
Section 6.2.2, pg 150
A little background: When the Java portions of the DWARF standard
were added, the compiled Java landscape was very different. In the
past couple of years, so-called "native Java" or "static image Java"
has seen a surge in popularity using various new approaches. Most
prominently of these, the "native image" tool which is shipped as
a part of Oracle's GraalVM is seeing a fairly significant increase
in real-world deployment. As such we've been evaluating approaches
to easing the debug experience for these binary Java deployments.
Now, to the point: Java relies on more information that just the
line number when debugging. Java is normally compiled from source
to bytecode; the native image tools then compile the bytecode to
a native machine executable. The bytecode index of any given
instruction is significant to Java debuggers and to the process
of debugging Java in general.
So, what is requested is the addition of another optional state
machine register (6.2.2) which tracks the bytecode index corresponding
to the current instruction. This would be largely similar to how
line and column numbers are tracked. Bytecode indices in Java are
16-bit unsigned values.