RFR(L): 8218628: Add detailed message to NullPointerException describing what is null.
Lindenmaier, Goetz
goetz.lindenmaier at sap.com
Wed Feb 20 16:36:47 UTC 2019
Hi Remi,
> yes, it's a feature of ASM, offer the right abstraction to do bytecode
> generation/transformation i.e. a stream of opcodes that are more abstract
> than the real bytecode, so there is no way to get a direct access to the
> bytecode at a specific BCI.
For the generation of the NPE message I intend the abstraction would be
helpful. But I need to identify the bytecode that raised the NPE to start
with, and I need to operate on the exact bytecode that was executed when
the NPE occurred.
Thus, two questions:
1. As I understand, it would be simple to extend ASM to deliver the initial
BCIs when the stream is parsed. They could be stored separately and
discarded once something gets modified (similar to InsnList.cache).
2. Is there any possibility to access the live datastructures/bytecode in the VM?
I was pointed to former JvmtiClassFileReconstitutor ... something like that?
Thanks and best regards,
Goetz.
More information about the core-libs-dev
mailing list