written 5.9 years ago by |
GNU is a project handled in 1984 to create free UNIX - like OS.
This project gave birth to free software revolution.
GNU Debugger or gdb is a software that allows user to take control of a program; start and stop a program, insert breakpoints, evaluate variables.
It can debug programs written in C, C++.
2 ways of running gdb:
Running gdb on a target.
Configuring gdb to run a target application.
GNU Debugger is used to debug PC applications. but is not used in this way in embedded systems, because running gdb requires too many resources for an embedded system.
For an application run by gdb, gdb has full control over an application running on the same system.
The application is not separate; it is actually run and controlled by gdb.
The GNU Debugger can be used in master/slave fashion.
Modes in Master/Slave Fashion:
The gdb server, named gdbserver compiles for that system and copied on a target platform. Here, a method of communication is needed to the host compiler computer. The target must have a working network configuration or a VART connection.
On the debugging PC, gdb must be run and connected to gdb server. ARM version of gdb must be read.
GDB server is often a software and some hardware implementations exist and are connected to USB port of development system.
To run the gdb:
Serial Output: gdb server/dev/ tty S0
Network Devices: gdbserver : 2345
- GNU Debugger is a command-line program used to communicate with a gdb server.
To launch gdb: arm-none-eabi-gdb
$\hspace{2.5cm}$(gdb) target 192.168.0.2:2345
$\hspace{2.5cm}$(gdb) run