aio*_*obe 10 java debugging bytecode verifyerror
我发现字节码VerifyErrors很难调试.JVM提供的反馈很少,通常只是当前类,有时是方法.
我通常通过ASM或Jasmin手动设计字节码时遇到的一些错误示例:
Stack size too largeUnable to pop operand off an empty stackFalling off the end of the codeExpecting to find object/array on stackIncompatible object argument for function callInconsistent stack height 4 != 2(要清楚;我知道所有这些意味着什么,我对调试它们的原因的工具或技术感兴趣.)
我的问题:是否有任何工具可以提供有关这些类型错误的详细反馈?我会欣赏诸如此类的信息
javap类似的输出小智 3
我认为你可以使用ASM提供的CheckClassAdapter( http://asm.ow2.org/asm40/javadoc/user/org/objectweb/asm/util/CheckClassAdapter.html )。它提供有关验证错误的更详细信息。