StackMapGenerator debug output
Adam Sotona
adam.sotona at oracle.com
Wed Aug 3 15:59:38 UTC 2022
StackMapGenerator is now providing more detailed info about root cause of the failure and appends bytecode print directly in the exception.
All the critical information should be now visible in the provided exception message.
Alternatively, a system variable switch can enable debug print, or it can be printed to a logger (which may cause issues with JDK bootstrap), or attached as another suppressed exception.
Please test it and send me your feedback.
Thanks,
Adam
On 21.07.2022 13:21, "Michael van Acken" <michael.van.acken at gmail.com> wrote:
Related but geared towards the builder side of things:
Is there a way to print out a trace of parts fed to CodeBuilder instances?
Just this morning I had Classfile die on me because of a stack underflow,
and it was quite hard to find out which parts were missing from the Code
attribute. And that with a Code totalling just 5 instructions...
If there would have been bytes output, then I could have inspected the
situation with javap. But if I mess up and pass inconsistent data to
CodeBuilder, causing it to throw instead of producing a byte array, then
I have an observability gap.
-- mva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20220803/be573b77/attachment.htm>
More information about the classfile-api-dev
mailing list