-
-
Notifications
You must be signed in to change notification settings - Fork 978
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--disasm switch on ARM64 throws Exception #1422
Comments
The disassembler does not work on ARM & ARM64 due to the fact that we are internally using As soon as https://github.com/0xd4d/iced/issues/79 and https://github.com/0xd4d/iced/issues/80 get implemented, we are going to update Iced on our side and add the support. I don't know when it's going to happen. |
Currently we can implement it in following ways: DOTNET_JitDisasmUse
Advantages:
Disadvantages:
capstoneThe current x64/x86 disassembler uses ClrMD to get disassembly as For arm64/arm we could use https://github.com/capstone-engine/capstone which supports .NET and arm. The .NET library has recently added support for linux and macOS (so far it supported only Windows): 9ee1/Capstone.NET#32, but a new NuGet package version was not published to nuget.org yet. However, a fork of it has published the package: https://www.nuget.org/packages/js6pak.Gee.External.Capstone Advantages:
Disadvantages:
IcedWe could contribute to Iced and implement arm64 support. This would require us to establish new abstractions (so far everything assumed x64) and also implement arm64/arm decoding. IMO this would be a lot of work, but I might be wrong. |
@janvorli I've done two experiments:
Branch that I've been using: https://github.com/dotnet/BenchmarkDotNet/tree/arm64Disasm Demo: ; BenchmarkDotNet.Samples.IntroDisassembly.SumField()
stp x29, x30, [sp, #-0x10]!
mov x29, sp
mov w1, wzr
mov w2, wzr
ldr x0, [x0, #8]
ldr w3, [x0, #8]
cmp w3, #0
b.le #0x1044
mov x3, x0
ldr w4, [x3, #8]
cmp w2, w4
b.hs #0x1040
sxtw x4, w2
lsl x4, x4, #2
add x4, x4, #0x10
ldr w3, [x3, x4]
add w1, w3, w1
add w2, w2, #1
ldr w3, [x0, #8]
cmp w3, w2
b.gt #0xfd8
mov w0, w1
ldp x29, x30, [sp], #0x10
ret
bl #0xffffffffff8a39b0
brk #0
; Total bytes of code 104 |
I get following exception when using
--disasm
on ARM64.The text was updated successfully, but these errors were encountered: