Debugging with Eclipse and gdb
Connecting to the target
First a connection to the TQ-Module has to be established with the Remote System Explorer. A step-by-step instruction is on this wiki page:
Connecting to the TQ-Module with the Remote System Explorer.
Configuration Eclipse gdb
Conditions:
- running demo application
- debugging works on the command line
- Create a new
C/C++ Remote Application
configuration there. - First select at the bottom
Select other
as launcher. In the appearing window checkUse configuration specific settings
and then select theStandard Remote Create Process Launcher
. - Then select the previously created connection as connection in the tab
Main
. - The
Remote Absolute File Path for C/C++ Application
has to be set (preferably via the buttonBrowse…
. - The project- and application settings should be set correctly.
- Additional parameters can be passed to the program to be debugged in the tab
arguments
. - The GDB debugger has to be set to the right GDB, in our case
arm-linux-gdb
, in the tabmain
of theDebugger Options
in the tabDebugger
. - The path to the
Shared Libraries
on the host system has to be added in theDebugger Options
for the module. In this case/opt/eldk/arm/lib
- Nothing has to be set in the tab
Gdbserver Settings
. - Save the settings with
Apply
and start debugging withDebug
.
Troubleshooting
No source available
When you start the debug process, the source code is not displayed. Instead, an error message appears. “No source available for main() ”
Reason: Debug symbols are not compiled in.
Correction: Activate the debug symbols in the variable CPPFLAGS
with the switch -g
in the make file:
CPPFLAGS := -Wall -g