0
610views
Write a note on GNU Debuggers
1 Answer
0
0views
  1. GNU is a project handled in 1984 to create free UNIX - like OS.

  2. This project gave birth to free software revolution.

  3. 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.

  4. It can debug programs written in C, C++.

  5. 2 ways of running gdb:

    • Running gdb on a target.

    • Configuring gdb to run a target application.

  6. 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.

  7. For an application run by gdb, gdb has full control over an application running on the same system.

  8. The application is not separate; it is actually run and controlled by gdb.

  9. The GNU Debugger can be used in master/slave fashion.

    Modes in Master/Slave Fashion:

  10. 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.

  11. On the debugging PC, gdb must be run and connected to gdb server. ARM version of gdb must be read.

  12. 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

enter image description here

Please log in to add an answer.