Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
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.
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.
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
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
What about this free program :: http://pel.hu/armu/
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am new in C programming, and I was searching the internet for a compiler (for Windows 10). The compilers I found all had a full IDE included, but I don't need the IDE (I have a code editor). Is there any C compiler that does not come with an IDE, or at least a way to download one without the IDE?
This is going to get closed, but anyway, you can use any linux based compiler such as gcc or clang.
Also, Visual c++ has a compiler that can be used at the command line. In fact, nearly all C compilers can be used at the command line.
I think Microsoft makes their compiler available for download free. Only the IDE costs money. The compiler itself runs by command and when you use the IDE it just runs the command in the background.
How to install gcc in Windows 10? (the easier way)
How to Install the Latest GCC on Windows
Installing GCC: Binaries
You should be able to install GCC without an editor. https://gcc.gnu.org/install/binaries.html
To install it, follow the tutorial here to use MinGW, or use this tutorial to use Cygwin.
On the other hand, you could just use an editor that includes support for GCC. It may already be built into your IDE.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm completely new on the whole cross compiling scene, but I'm willing to learn. My objective right now is to compile a simple program (written in C) for an Arm M0 processor. I would like to do it as much as possible with free tools (open source or official, it does not matter). My PC runs a Debian Testing x64 operating system. My specific questions are:
1) What tools should I download? (can be console or IDE, whichever works best in your opinion)
2) Could you point me to a good tutorial that can teach me the basics? I know this is far from trivial and something hard to accomplish if you have little experience, but I want to try and I'd appreaciate a hand getting started.
Just to clarify, my objective is a program for an M0 that is not in any specific board or build. Which means I'm going to have to define where the memory is and configure the communication with the PC. So the tools need me to allowed to do that.
In Linux machine first of all you need to install arm toolchain.
sudo apt-get install gcc-arm-linux-gnueabi
Second step compile your program let say hello.c by
arm-linux-gnueabi-gcc -o hello hello.c
you can find how to cross compile toolchain,programs and library for ARM platform.
You can also check GNU Tools for ARM Embedded Processors
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I tried to disassemble AMD ELF by using objdump.
But objdump say 'File format not recognized'.
How do I disassemble AMD ELF on x86 os?
Are you talking about an AMD64, a.k.a. x86_64, binary? What kind of OS are you running? I'm assuming Linux since you are using 'objdump', but perhaps another UNIX variant? What type of CPU? If you are on Linux, please run 'uname -a' and post the results in this question. Also, what distribution ('cat /etc/issue' to find out)?
My best guess is that you are running a 32-bit x86 Linux distribution that does not have support for x86_64 binaries (I just tried to disassemble an x86_64 binary on my x86_32 Ubuntu 11.04 distro and it worked fine).
You can use this tool, http://www.onlinedisassembler.com/odaweb/file_upload, to disassemble a file for almost any architecture.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
am pretty excited with the GNU Debugger and a GUI called Insight as it has saved me A LOT OF time. Thus I am posting this question/answer for other newbies out there like me having problems with their C code looking for a visual way to see what's going on.
I am working on Linux Mint (Ubuntu) btw.
I highly recommend ddd especially if you have complex data structures to visualize.
Install Insight a GUI for GNU Project Debugger
Compile your source
Run the debugger
_
$ sudo apt-get install insight
$ gcc -g source.c -o application
$ insight
When developing for Windows using GCC. The best is to use Affinic Debugger GUI(GDB). it is newer design. it is similar and better than DDD. It also works for Linux and Mac
NetBeans has a nice front end for gdb. So does Eclipse.
Your are right that we load the executables, but when you are compiling you will need to compile with the debug flag (think is it -g in gcc, abit rusty on that ), that will insert the debugging information into the executable/obj files.
When developing for Windows using GCC (e.g. MinGW), I often found it painful to get a GUI for GDB working (And I have a disliking for Eclipse), but I'm really fond of the Code:Blocks IDE.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I am searching for a decompiler for a C program. The binary is a 32-bit x86 Linux executable. Objdump works fine, so basically I am searching for something which attempts to reconstruct the C source from the asm source.
Seconding Hex-rays, but if you can't justify that cost, Boomerang might work.
If you have money to spare, Hex-Rays Decompiler could be worth your while. :-)
As much as IDA can be helpful it cost quite a lot of money.
Not sure about your specific use case but Plasma seems like it would do the trick "Plasma is an interactive disassembler for x86/ARM/MIPS. It can generate indented pseudo-code with colored syntax."
If you are looking for something more similar to IDA I heavily recommend Radare2. There's also ODA the online dissembler in case you don't feel like installing anything.
A new addition is Binary Ninja and although it's not even close to the capabilities of IDA or Radare yet, it's a cheap and good utility for starters.
Update:
Since this comment the NSA have released Ghidra which is completely open source and free. It is a full pledges RE framework with high end decompiler.
For binary decompiling, I have bought a personal license of Hopper https://www.hopperapp.com .
The advantages are:
has an intuitive and well thought graphical interface;
runs in MacOS and Linux;
provides a reasonable C-like decompiler output;
decompiles 32-bit and 64-bit binaries;
supports Mach-O binaries (Mac and iOS), PE32/32+/64 Windows binaries and ELF binaries;
has very regular free updates;
the license price at around 100 USD cannot be beaten.
IMO, the ratio cost/quality beats fairly easily IDA/Hex-rays, and it leaves in the dust the other commercial (or free) decompilers.
Additionally, you can try it out or use the demo version to get a feel of it and decompile (very) small executables for free.
From now on (March/2019), as an alternative, you also have Ghidra from NSA. Ghidra runs on Linux, Mac and Windows as long as JDK 11 is installed. It is presented "as a free tool comparable to X/Rays".
Ghidra feels more powerful, however Hopper still seems more intuitive.
See also: PepperMalware Blog - Quick Analysis of a Trickbot Sample with NSA's Ghidra SRE Framework
Snowman (http://derevenets.com) looks nice. The generated code is a mess, but works.