On Wed, 27 Jan 2021 14:58:27 GMT, Vladimir Kempik <vkem...@openjdk.org> wrote:

>> Build changes per se now looks okay. However, I agree with Erik that unless 
>> this PR can wait for the JNF removal, at the very least the build docs needs 
>> to be updated to explain how to successfully build for this platform. (I can 
>> live with the configure command line hack, since it's temporary -- otherwise 
>> I'd have requested a new configure argument.) This can be done in this PR or 
>> a follow-up PR.
>
>> Build changes per se now looks okay. However, I agree with Erik that unless 
>> this PR can wait for the JNF removal, at the very least the build docs needs 
>> to be updated to explain how to successfully build for this platform. (I can 
>> live with the configure command line hack, since it's temporary -- otherwise 
>> I'd have requested a new configure argument.) This can be done in this PR or 
>> a follow-up PR.
> 
> I believe it's better be done under separate PR/bugfix, so it can be 
> completely reverted once JNF removed.

You need add macos arm64 to hsdis. Having it working is fairly essential for 
debugging.

Inside src/utils/hsdis, After cloning binutils
make; make demo; ./build/macosx-arm64/hsdis-demo
Results in:
Hello, world!
...And now for something completely different:

Decoding from 0x1046e31a4 to 0x1046e3664...with decode_instructions_virtual
hsdis: bad native mach=architecture not set in Makefile!; please port hsdis to 
this platform
hsdis output options:

I fixed it by changing the makefile to force the build flags:
ARCH=aarch64
CFLAGS/aarch64    += -m64
Resulting in:
Hello, world!
...And now for something completely different:

Decoding from 0x10012719c to 0x10012765c...with decode_instructions_virtual
Decoding for CPU 'aarch64'
main:
 0x10012719c    sub     sp, sp, #0x60
 0x1001271a0    stp     x29, x30, [sp, #80]
...etc

Putting the library in the right place then made disassembly in java work for 
me.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2200

Reply via email to