Local debugging using gdbΒΆ
By default, the build system generates an executable for the local host, as defined in the all target. It is possible to use that executable with GDB to run it using step debugging or breakpoints. For a better debug experience it is desirable to have debug symbols and disable optimizations. This can be done by passing the appropiate flags to the build system. For example, in POSIX alike systems:
make CFLAGS='-g -Og' LDFLAGS=-g
As these flags would be required in every compilation, it is better to set them in the personal configuration as it is shown in the Personal configuration section.
It is important to notice that to be able to run the agent in GDB, the same configuration and environment for a normal execution is required, as explained in Running the EVP Agent.
For a detailed description of the GDB commands it is possible to use the info command in any UNIX machine:
info gdb
There are many graphical frontends for GDB, like for example DDD. Almost all the development environments, like for example VScode, Eclipse, Emacs, include a frontend for GDB. Please, consult the documentation of the development environment to learn how to setup it to use GDB.