-
Notifications
You must be signed in to change notification settings - Fork 95
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
Disassembly window showing x86 code when debugging ARM program #125
Comments
i dont think qemu-arm supports ptrace at all and the process that runs transparently arm binaries in linux is using jit compilation to execute onlny intel code. so i guess that what you are seeing i an attempt to do something that is not possible. if you want to debug an arm binary on x86 i would recommend you to run a whole operating system in arm in qemu or so (you can check GNOME Boxes for example i think it have ready to use images for this), or just use an rpi to run the code natively and then from iaito/r2 you can use the gdb remote to attach and debug it. But if you run the whole operating system in arm, i would suggest you to just run iaito or r2 natively on arm, so you dont need gdb remote at all. |
Great minds think alike! I spend the whole weekend (chewing glass) in order to get a graphical qemu-system-arm going. (and then at least 12 hours for the iaito compile). So good so far, right? Nope the maximum screen resolution of qemu is 800x600 so I cannot hit the okay button! |
haha wow :) good screenshot, you can also export the X DISPLAY to your host system via tcp and get the app rendering as a window in your native linux machine instead of the slow qemu framebuffer too :) you can also use r2 from the shell and it will be easier to setup :D but if you want iaito thats how you rule :) never tried iaito on arm64/linux, so let me know how the adventure goes |
I'm getting a corrupted shared object error, trying to run the program in raspbian (under qemu-system-arm). So back to Kali. In this case the disassembly is correct YAY but the registers and stack (which is what I really need) is empty. Somebody must have tried this and been successful examining non-native code on an x86 computer? |
Let me start by asking for your patience, I'm a total NOOB at this.
Running latest version with IAITO in Kali (tried Debian as well) On a Intel core2 duo. Trying to study an ARM:32:EL:v8 program.
Debug shows the incorrect x86 code in Disassembly window (but mostly ARM registers (see picture). Importantly debug does complete the execution successfully! Just wish I could see what it's doing in the code.
I will also add that the emulator even shows the X86 registers and tries to (and fails) to run the code as x86, even though it is ARM. Lastly, I hope you will add the option of command line parameters for the emulator!
P.S. I've gotten to the point that I can actually run the program using qemu-arm in one terminal and gdb-multiarch in another to step through the code. But really need to get a better view of the stack (no symbol table, nor headers), so was hoping IAITO was the answer.
Thanks for all the great work!
The text was updated successfully, but these errors were encountered: