Debugging with GDB
From dmon2
Jump to navigationJump to searchDebugging Source code with Eclipse, GDB and DMON
- Download latest Eclipse IDE for C/C++ Developers from https://www.eclipse.org
- Unzip
- Unzip Compilers needed to c:\opt (i.e. C:\opt\sparc-elf-4.4.2-mingw)
- Add “C:\opt\sparc-elf-4.4.2-mingw\bin” and “C:\opt\sparc-elf-4.4.2-mingw\sparc-elf\bin” to System Path
- Download and install CYGWIN from https://www.cygwin.com/
- Add C:\cygwin\bin to the System Path at the beginning
- Install DMON, follow readme in DMON folder
- Start Eclipse
- Select File -> New -> C Project in Eclipse
- Select “Empty Project” or “ Hello world ANSI C Project” and Toolchains : “Cross GCC”
- Select 'Next' to last Dialog to set cross compilers prefix and Path to bin folder and press 'Finish' to create new C project
- Build the Project
- Select 'Debug Configurations' and create new 'GDB Hardware Debugging'. Set Project and application
- Configure 'Debugger' section
- Configure 'Startup' section if you need
- Press 'Debug' to start debugging. The Program should stop at 'main'.
Debugging source code using Eclipse, GDB and DMON tutorial: