Tuesday, August 2, 2011

Debugging ARM files with DDD (Simulation)

DDD is a graphical front-end to a variety of debuggers, including arm-elf-gdb.


Installation
In Ubuntu, install by running sudo apt-get install ddd 
For OS X, you can try your luck over here.
Usage
With the GNU ARM tools installed, in the terminal run ddd --debugger arm-elf-gdb &
Click File -> Open Program. Select your ELF file (that was assembled with --gdwarf2).
In the GDB console (the bottom pane), type
(gdb) target sim 
(gdb) load
(gdb) start 
You can view the registers by clicking Source -> Registers.
You can now step through the program, set breakpoints, and perform most other functions that GDB is capable of.


No comments:

Post a Comment