On Thu, 28 Sep 2023 21:23:25 GMT, Ashutosh Mehra <asme...@openjdk.org> wrote:
> Please review this change to fix the operands of the bytecodes that operate > on fields when dumping a class using SA. > > Testing: hotspot_serviceability > > I have also verified that > `test/hotspot/jtreg/serviceability/sa/ClhsdbDumpclass.javaClhsdbDumpclass.java`, > which is in the problem list because of this issue, passes with this change. > I have also verified it by dumping the class that has getstatic/putstatic > bytecodes and comparing the bytecodes manually with the original classfile. src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/tools/jcore/ByteCodeRewriter.java line 137: > 135: case Bytecodes._invokedynamic: { > 136: int cpci = method.getNativeIntArg(bci + 1); > 137: cpoolIndex = (short) > cpCache.getIndyEntryAt(~cpci).getConstantPoolIndex(); Is this really suppose to be `~cpci` and not just `cpci`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15973#discussion_r1340721878