Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARM disassembly [closed]

Tags:

arm

Is there a tool which analyzes and can highlight what each line of code means. I am not looking for a decompiler like that of Hex-Rays Decompiler. I am looking for a simple tool that shall be of assistance in reading the assembly code.

like image 625
tecMav Avatar asked Nov 20 '12 07:11

tecMav


3 Answers

What about using objdump?

$ cat add.c 
int add(int a, int b) {
    return a + b;
}

$ arm-linux-gnueabihf-gcc -c -O2 add.c

$ arm-linux-gnueabihf-objdump -d add.o

add.o:     file format elf32-littlearm


Disassembly of section .text:

00000000 <add>:
   0:   1840        adds    r0, r0, r1
   2:   4770        bx  lr

It can provide source code mixing as well if your object file contains debug information (gcc -g) and if you supply -S to objdump.

like image 167
auselen Avatar answered Nov 05 '22 14:11

auselen


The Online Disassembler (ODA) supports ARM and a myriad of other architectures. You can enter binary data in the Live View and watch the disassembly appear as you type, or you can upload a file to disassemble. A nice feature of this site is that you can share the link to the disassembly with others.

http://www.onlinedisassembler.com

like image 11
Anthony DeRosa Avatar answered Nov 05 '22 13:11

Anthony DeRosa


As you mentioned in your question, IDA Pro can disassemble ARM too.
Besides, have you tried ARM DS-5 Development Studio?
Some features are more hardware-related, but the IDE (Eclipse) is very nice.

Features:

  • Debug support for bare-metal, RTOS, Linux, and Android platforms
  • Non-intrusive cycle-accurate ETM and PTM instruction tracing
  • Seamless support for SMP systems
  • Automated debug sessions for faster debug cycles
  • ITM and STM instrumentation tracing
  • Support for pre-configured and custom platforms

In the manual it says it contains:

  • DS-5 Debugger, covering all stages of product development
  • ARM Compiler 5.04 for embedded and bare-metal code
  • Linaro GCC Toolchain 2013.03 for Linux applications and Linux kernel
  • ARM Streamline™ Performance Analyzer for various operating systems, including Linux, Android and RTX
  • Eclipse IDE, source code editor and project manager
  • Fixed Virtual Platforms (FVP) for Cortex™-A8 and quad-core Cortex-A9 processors
  • Example projects and documentation
like image 3
jyz Avatar answered Nov 05 '22 12:11

jyz